From: Jo Shields Date: Thu, 27 Jul 2023 14:31:37 +0000 (-0400) Subject: Improve default cross compiler state (#88917) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~743 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc7621c993b01f2e6890ff052747e4ac62ee196e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Improve default cross compiler state (#88917) * Move AOT variable setting to BuildMonoCross target * Ensure a value for AotHostOS/AotHostArchitecture if not specified * improve wasm windows special-case --- diff --git a/src/mono/mono.proj b/src/mono/mono.proj index f59bf1f..8b8f62a 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -553,12 +553,6 @@ <_MonoCXXFLAGS Include="-Wl,--build-id=sha1" /> <_MonoCXXFLAGS Condition="'$(Platform)' == 'arm'" Include="-march=armv7-a" /> - - <_MonoAOTCFLAGS Include="-Wl,--build-id=sha1" /> - <_MonoAOTCFLAGS Condition="'$(AotHostArchitecture)' == 'arm'" Include="-march=armv7-a" /> - <_MonoAOTCXXFLAGS Include="-Wl,--build-id=sha1" /> - <_MonoAOTCXXFLAGS Condition="'$(AotHostArchitecture)' == 'arm'" Include="-march=armv7-a" /> - @@ -655,6 +649,12 @@ + + + $(BuildArchitecture) + $(HostOS) + + @@ -687,7 +687,7 @@ - + <_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*"/> @@ -700,7 +700,7 @@ <_MonoLLVMTargetArchitecture Condition="'$(MonoUseLLVMPackage)' == 'true'">$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(AotHostArchitecture)' != '' and '$(MonoUseLLVMPackage)' == 'true'">$(AotHostArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(MonoUseLLVMPackage)' == 'true'">$(AotHostArchitecture) @@ -709,13 +709,19 @@ <_MonoAOTCXXFLAGS Include="-stdlib=libc++" /> + + <_MonoAOTCFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoAOTCFLAGS Condition="'$(AotHostArchitecture)' == 'arm'" Include="-march=armv7-a" /> + <_MonoAOTCXXFLAGS Include="-Wl,--build-id=sha1" /> + <_MonoAOTCXXFLAGS Condition="'$(AotHostArchitecture)' == 'arm'" Include="-march=armv7-a" /> + - - - - - + + + + + <_MonoAOTCFLAGS Condition="'$(AotHostArchitecture)' == 'arm64'" Include="-arch arm64" /> @@ -737,7 +743,7 @@ - + <_MonoAOTCPPFLAGS Include="-DHOST_WIN32" /> <_MonoAOTCPPFLAGS Include="-D__WIN32__" /> <_MonoAOTCPPFLAGS Include="-DWIN32" /> @@ -805,7 +811,7 @@ - + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=$(AotHostArchitecture)" /> @@ -849,7 +855,7 @@ - <_MonoSkipInitCompiler Condition="'$(AotHostArchitecture)' != '' and '$(AotHostArchitecture)' != '$(BuildArchitecture)'">false + <_MonoSkipInitCompiler Condition="'$(AotHostArchitecture)' != '$(BuildArchitecture)'">false <_MonoSkipInitCompiler Condition="'$(CrossBuild)' == 'true'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" @@ -910,6 +916,13 @@ + + + + $(BuildArchitecture) + $(HostOS) + + <_MonoRuntimeFilePath>$(MonoObjDir)out\lib\$(MonoFileName) <_MonoRuntimeStaticFilePath Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">$(MonoObjDir)out\lib\$(MonoStaticLibFileName) @@ -921,7 +934,7 @@ <_MonoLLVMTargetArchitecture>$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(AotHostArchitecture)' != ''">$(AotHostArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm'">$(AotHostArchitecture)