From c00ffb7e5c07bc582d93a84e584b2c7bf71bf604 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Mon, 22 Aug 2022 14:57:09 -0400 Subject: [PATCH 01/42] Initial changes. Mostly builds android-arm64 cross compiler for linux-arm64 on linux-x64, but fails on linker step as we still try to use linux-x64 LLVM for linking. --- src/mono/mono.proj | 63 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 26ca5545d761b..2035b9f9bbf9d 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -362,10 +362,10 @@ <_MonoCFLAGS Condition="'$(MonoWasmThreads)' != 'true'" Include="$(EscapedQuoteW)-I$([MSBuild]::NormalizePath('$(PkgMicrosoft_NETCore_Runtime_ICU_Transport)', 'runtimes', 'browser-wasm', 'native', 'include'))$(EscapedQuoteW)"/> - + <_MonoCCOption>CC="$(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" <_MonoCXXOption>CXX="$(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" - <_MonoRunInitCompiler>false + <_MonoSkipInitCompiler>true <_MonoCMakeSysroot Condition="'$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true'">$(XcodeDir)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(iOSVersion).sdk <_MonoCMakeSysroot Condition="'$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' == 'true'">$(XcodeDir)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(iOSVersion).sdk <_MonoCMakeSysroot Condition="'$(TargetstvOS)' == 'true' and '$(TargetstvOSSimulator)' != 'true'">$(XcodeDir)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(tvOSVersion).sdk @@ -417,8 +417,8 @@ <_MonoCXXFLAGS Include="-fexceptions" /> - - <_MonoRunInitCompiler>false + + <_MonoSkipInitCompiler>true <_MonoCPPFLAGS Include="-DANDROID_FORCE_ICU_DATA_DIR" /> @@ -513,9 +513,9 @@ $([MSBuild]::EnsureTrailingSlash('$(EMSDK_PATH)')) <_MonoCMakeConfigureCommand>cmake @(_MonoCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoRunInitCompiler)' != 'false' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand)' - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoRunInitCompiler)' != 'false' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjDir)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoRunInitCompiler)' == 'false'">$(_MonoCCOption) $(_MonoCXXOption) @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand)' + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjDir)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' == 'true'">$(_MonoCCOption) $(_MonoCXXOption) @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(EMSDK_PATH)/emsdk_env.sh 2>&1 && emcmake $(_MonoCMakeConfigureCommand)' <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" && call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && emcmake $(_MonoCMakeConfigureCommand) @@ -718,6 +718,46 @@ + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=arm" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/arm-linux-gnueabihf/pkgconfig" /> + + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=armv6" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/arm-linux-gnueabihf/pkgconfig" /> + + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=arm64" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/aarch64-linux-gnu/pkgconfig" /> + + + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=riscv64" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/riscv64-linux-gnu/pkgconfig" /> + + + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=s390x" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/s390x-linux-gnu/pkgconfig" /> + + + + + + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=ppc64le" /> + <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/powerpc64le-linux-gnu/pkgconfig" /> + + <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" @@ -747,12 +787,15 @@ <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') - <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoProjectRoot) - <_MonoAotCMakeConfigureCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) + <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' == 'true'">$(_MonoAOTCCOption) $(_MonoAOTCXXOption) @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration) <_MonoAotCMakeBuildCommand Condition="'$(MonoVerboseBuild)' == 'true'">$(_MonoAotCMakeBuildCommand) --verbose <_MonoAotCMakeBuildCommand Condition="'$(_MonoUseNinja)' != 'true'">$(_MonoAotCMakeBuildCommand) --parallel $([System.Environment]::ProcessorCount) - <_MonoAotCMakeBuildCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) + <_MonoAotCMakeBuildCommand Condition="'$(HostOS)' != 'windows'">@(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) + <_MonoAotCMakeBuildCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeBuildCommand) <_MonoAotPrebuiltOffsetsFile>$(ArtifactsObjDir)\mono\offsetfiles\$(PlatformConfigPathPart)\cross\$([System.IO.Path]::GetFileName('$(MonoAotOffsetsFile)')) From 714f344bdb679032f5ecb0fc2f594b57f76c1f67 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Mon, 22 Aug 2022 18:00:11 -0400 Subject: [PATCH 02/42] Rearchitect LLVM package inclusion, so cross-compiled cross-compilers makes sense --- eng/Subsets.props | 2 +- src/mono/Directory.Build.props | 6 ++-- src/mono/llvm/llvm-init.proj | 59 ++++++++++++++++++---------------- src/mono/mono.proj | 19 ++++++----- 4 files changed, 44 insertions(+), 42 deletions(-) diff --git a/eng/Subsets.props b/eng/Subsets.props index 911c24dbde65e..0857c830efd67 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -59,7 +59,7 @@ clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime mono.llvm+ - mono.llvm+ + mono.llvm+ $(DefaultMonoSubsets)mono.wasmruntime+ $(DefaultMonoSubsets)mono.aotcross+ $(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+mono.tools+ diff --git a/src/mono/Directory.Build.props b/src/mono/Directory.Build.props index b64f87e11d95c..6bc85c60667b9 100644 --- a/src/mono/Directory.Build.props +++ b/src/mono/Directory.Build.props @@ -53,10 +53,8 @@ true true true - <_MonoUseLLVMPackage Condition="'$(MonoLLVMDir)' == '' and '$(MonoEnableLLVM)' == 'true'">true - <_MonoUseAOTLLVMPackage Condition="'$(MonoAOTLLVMDir)' == '' and '$(MonoAOTEnableLLVM)' == 'true'">true - $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'llvm')) - $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'cross', 'llvm')) + <_MonoUseLLVMPackage Condition="'$(MonoLLVMDir)' == '' and ('$(MonoEnableLLVM)' == 'true' or $(MonoAOTEnableLLVM) == 'true')">true + $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'llvm')) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 178c4c28e6b81..aa55b204f7da0 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -15,39 +15,44 @@ $(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion) - - - $(TargetArchitecture) - $(BuildArchitecture) - - - - - - - - - - - - + + + + + + + + + + + + + - - + - - - - - + + + + diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 2035b9f9bbf9d..291a79099cddd 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -6,7 +6,6 @@ - MonoEnableLLVM - enable LLVM - MonoLLVMDir - [optional] the directory where LLVM is located - MonoAOTEnableLLVM - enable LLVM for an AOT-only Mono - - MonoAOTLLVMDir - [optional] the directory where LLVM is located, for an AOT-only Mono - MonoVerboseBuild - enable verbose build - MonoThreadSuspend - coop,hybrid,preemptive - default thread suspend mode - MonoWasmThreads - build runtime with threading support for wasm @@ -210,7 +209,7 @@ <_MonoCMakeArgs Include="-DCMAKE_INSTALL_LIBDIR=lib"/> <_MonoCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/> <_MonoCMakeArgs Condition="'$(CMakeArgs)' != ''" Include="$(CMakeArgs)"/> - <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir.TrimEnd('\/'))" /> + <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir)\$(TargetArchitecture)" /> <_MonoCMakeArgs Condition="'$(BuildDarwinFrameworks)' == 'true'" Include="-DBUILD_DARWIN_FRAMEWORKS=1" /> <_MonoCMakeArgs Include="-DGC_SUSPEND=$(MonoThreadSuspend)" /> <_MonoCMakeArgs Include="-DMONO_LIB_NAME=$(MonoLibName)" /> @@ -644,9 +643,9 @@ true wasm32-unknown-none $(MonoObjCrossDir)offsets-wasm32-unknown-none.h - $(MonoAOTLLVMDir)/lib/libclang.dylib - $(MonoAOTLLVMDir)/lib/libclang.so - $([MSBuild]::NormalizePath('$(MonoAOTLLVMDir)', 'bin', 'libclang.dll')) + $(MonoLLVMDir)/$(TargetArchitecture)/lib/libclang.dylib + $(MonoLLVMDir)/$(TargetArchitecture)/lib/libclang.so + $([MSBuild]::NormalizePath('$(MonoLLVMDir)', '$(TargetArchitecture)', 'bin', 'libclang.dll')) setlocal EnableDelayedExpansion && call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && !EMSDK_PYTHON! <_ForceRelease Condition="$([MSBuild]::IsOSPlatform('Windows')) and '$(TargetArchitecture)' == 'wasm' and '$(Configuration)' == 'Debug'">true @@ -776,7 +775,7 @@ - + @@ -887,16 +886,16 @@ <_MonoRuntimeArtifacts Include="$(_MonoAotCrossPdbFilePath)" Condition="Exists('$(_MonoAotCrossPdbFilePath)')"> $(RuntimeBinDir)cross\$(PackageRID)\$(MonoAotCrossPdbFileName) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\llc$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\llc$(ExeSuffix)"> $(RuntimeBinDir)\llc$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\bin\opt$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\opt$(ExeSuffix)"> $(RuntimeBinDir)\opt$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\llc$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\llc$(ExeSuffix)"> $(RuntimeBinDir)cross\$(PackageRID)\llc$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoAOTLLVMDir)\bin\opt$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\opt$(ExeSuffix)"> $(RuntimeBinDir)cross\$(PackageRID)\opt$(ExeSuffix) <_MonoIncludeArtifacts Include="$(MonoObjDir)out\include\**" /> From 452bce6e37ac36bcb0160b5b9059881201e5d3dd Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 10:30:27 -0400 Subject: [PATCH 03/42] Offsets tool should use host arch libclang --- src/mono/mono.proj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 291a79099cddd..127b005db7e90 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -643,9 +643,9 @@ true wasm32-unknown-none $(MonoObjCrossDir)offsets-wasm32-unknown-none.h - $(MonoLLVMDir)/$(TargetArchitecture)/lib/libclang.dylib - $(MonoLLVMDir)/$(TargetArchitecture)/lib/libclang.so - $([MSBuild]::NormalizePath('$(MonoLLVMDir)', '$(TargetArchitecture)', 'bin', 'libclang.dll')) + $(MonoLLVMDir)/$(BuildArchitecture)/lib/libclang.dylib + $(MonoLLVMDir)/$(BuildArchitecture)/lib/libclang.so + $([MSBuild]::NormalizePath('$(MonoLLVMDir)', '$(BuildArchitecture)', 'bin', 'libclang.dll')) setlocal EnableDelayedExpansion && call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && !EMSDK_PYTHON! <_ForceRelease Condition="$([MSBuild]::IsOSPlatform('Windows')) and '$(TargetArchitecture)' == 'wasm' and '$(Configuration)' == 'Debug'">true From 52b4fba4f7761c35951d45d25746f27c8be4e41a Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 11:08:42 -0400 Subject: [PATCH 04/42] Fix Wasm --- src/mono/mono.proj | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 127b005db7e90..03559b46b5fa0 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -203,13 +203,17 @@ + + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm'">$(TargetArchitecture) + <_MonoCMakeArgs Condition="'$(_MonoUseNinja)' == 'true'" Include="-G Ninja"/> <_MonoCMakeArgs Include="-DCMAKE_INSTALL_PREFIX="$(MonoObjDir)out""/> <_MonoCMakeArgs Include="-DCMAKE_INSTALL_LIBDIR=lib"/> <_MonoCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/> <_MonoCMakeArgs Condition="'$(CMakeArgs)' != ''" Include="$(CMakeArgs)"/> - <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir)\$(TargetArchitecture)" /> + <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)" /> <_MonoCMakeArgs Condition="'$(BuildDarwinFrameworks)' == 'true'" Include="-DBUILD_DARWIN_FRAMEWORKS=1" /> <_MonoCMakeArgs Include="-DGC_SUSPEND=$(MonoThreadSuspend)" /> <_MonoCMakeArgs Include="-DMONO_LIB_NAME=$(MonoLibName)" /> @@ -641,6 +645,7 @@ true + <_MonoSkipInitCompiler>true wasm32-unknown-none $(MonoObjCrossDir)offsets-wasm32-unknown-none.h $(MonoLLVMDir)/$(BuildArchitecture)/lib/libclang.dylib @@ -760,6 +765,8 @@ <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm'">$(TargetArchitecture) @@ -775,7 +782,7 @@ - + From 66e5a157351f7565bae464a2156365c8723b838d Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 11:32:54 -0400 Subject: [PATCH 05/42] Add debug output to llvm-init.proj --- src/mono/llvm/llvm-init.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index aa55b204f7da0..c759554be4efc 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -52,6 +52,7 @@ + From 377833b06474565a8b43d737115f9c1fc2df1a2a Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 12:17:22 -0400 Subject: [PATCH 06/42] Work with PackageReference manipulation directly, to avoid context issues w/ ItemGroup --- src/mono/llvm/llvm-init.proj | 63 +++++++++++++++++------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index c759554be4efc..7dee59691fb7c 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -15,42 +15,37 @@ $(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion) - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + From 8d39d0af2fa4dcd21afa7dde215952fe1a936fdd Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 12:41:53 -0400 Subject: [PATCH 07/42] Revert "Work with PackageReference manipulation directly, to avoid context issues w/ ItemGroup" This reverts commit 377833b06474565a8b43d737115f9c1fc2df1a2a. --- src/mono/llvm/llvm-init.proj | 63 +++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 7dee59691fb7c..c759554be4efc 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -15,37 +15,42 @@ $(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion) - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + From 5351c280daeb3be68986085f55c8d8d21f1abbdb Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 13:18:00 -0400 Subject: [PATCH 08/42] Revert "Revert "Work with PackageReference manipulation directly, to avoid context issues w/ ItemGroup"" This reverts commit 8d39d0af2fa4dcd21afa7dde215952fe1a936fdd. --- src/mono/llvm/llvm-init.proj | 63 +++++++++++++++++------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index c759554be4efc..7dee59691fb7c 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -15,42 +15,37 @@ $(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion) - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + From 1a8d2b2f6c20e1df8b2c1498e3c16b963b160685 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 13:21:59 -0400 Subject: [PATCH 09/42] Deduplicate --- src/mono/llvm/llvm-init.proj | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 7dee59691fb7c..8b1a1a93cdec0 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -29,17 +29,20 @@ PackageArch="$(BuildArchitecture)" Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> + Version="$(MonoLLVMSDKVersion)" + PackageArch="$(RealTargetArchitecture)" + Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != 'x86' and '$(RealTargetArchitecture)' != 'wasm'" /> + Version="$(MonoLLVMSDKVersion)" + PackageArch="$(BuildArchitecture)" + Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> + <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> + + From 379b62c71c07b29eef12bcafb62d9586173c2d20 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 13:45:02 -0400 Subject: [PATCH 10/42] Skip compiler init on Android --- src/mono/mono.proj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 03559b46b5fa0..1ca8cc2b3c829 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -420,7 +420,7 @@ <_MonoCXXFLAGS Include="-fexceptions" /> - + <_MonoSkipInitCompiler>true @@ -605,6 +605,7 @@ + <_MonoSkipInitCompiler>true true $(XcodeDir)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(iOSVersion).sdk $(XcodeDir)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(iOSVersion).sdk @@ -689,6 +690,7 @@ + <_MonoSkipInitCompiler>true linux-x86_64 darwin-x86_64 windows-x86_64 From 07ba25335ffbafb6ff719fe324af509a30df1b93 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 13:51:48 -0400 Subject: [PATCH 11/42] Hack to deal with osx-10.12 vs osx-11.0 host OS on arm64 LLVM --- src/mono/llvm/llvm-init.proj | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 8b1a1a93cdec0..1a820483dd193 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -2,8 +2,7 @@ linux - osx.10.12 - osx.11.0 + osx.10.12 win $(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion) $(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion) @@ -41,6 +40,20 @@ PackageArch="$(BuildArchitecture)" Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> + + + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" + Version="$(MonoLLVMToolsVersion)" + PackageArch="arm64"/> + + + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> + <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" + Version="$(MonoLLVMSDKVersion)" + PackageArch="arm64"/> + + From d313bc8fa2732f12c52ec6ca6e3830f797aa4877 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 14:50:05 -0400 Subject: [PATCH 12/42] ItemGroup crimes --- src/mono/llvm/llvm-init.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 1a820483dd193..087ec76abee9c 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -41,13 +41,13 @@ Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> - + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(MonoLLVMToolsVersion)" PackageArch="arm64"/> - + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(MonoLLVMSDKVersion)" From 0786b794ed6f72390dae8bb166c4e62cfe12e545 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 15:40:08 -0400 Subject: [PATCH 13/42] No LLVM for mac-arm --- src/mono/llvm/llvm-init.proj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 087ec76abee9c..75453fd7a22af 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -40,7 +40,11 @@ PackageArch="$(BuildArchitecture)" Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> + + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" From 4cf2ee23da7cee1a5bac8aaba15dad35a9caf037 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 16:42:24 -0400 Subject: [PATCH 14/42] Typo --- src/mono/llvm/llvm-init.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 75453fd7a22af..06498d7be88be 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -42,7 +42,7 @@ <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> - <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> From be82b600b55a6ae94a6d6d0807dd2cdf42f0928f Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 23 Aug 2022 17:11:21 -0400 Subject: [PATCH 15/42] Never use llvm-config. Our cross-compiler mess is too complex. --- src/mono/CMakeLists.txt | 60 ++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 1629fe4dbcec9..711b0d6edb377 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -594,53 +594,33 @@ if(LLVM_PREFIX) message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") endif() - if(CMAKE_CROSSCOMPILING) - # Can't run llvm-config, hardcode results - set(llvm_config_path "${LLVM_PREFIX}/include/llvm/Config/llvm-config.h") + set(llvm_config_path "${LLVM_PREFIX}/include/llvm/Config/llvm-config.h") - # llvm-config --mono-api-version - file(STRINGS ${llvm_config_path} llvm_api_version_line REGEX "MONO_API_VERSION ") - string(REGEX REPLACE ".*MONO_API_VERSION ([0-9]+)" "\\1" llvm_api_version ${llvm_api_version_line}) + # llvm-config --mono-api-version + file(STRINGS ${llvm_config_path} llvm_api_version_line REGEX "MONO_API_VERSION ") + string(REGEX REPLACE ".*MONO_API_VERSION ([0-9]+)" "\\1" llvm_api_version ${llvm_api_version_line}) - # llvm-config --cflags - set(llvm_cflags "") - set(llvm_cxxflags "") - set(llvm_includedir "${LLVM_PREFIX}/include") + # llvm-config --cflags + set(llvm_cflags "") + set(llvm_cxxflags "") + set(llvm_includedir "${LLVM_PREFIX}/include") - # llvm-config --system-libs - set(llvm_system_libs "-lz" "-lrt" "-ldl" "-lpthread" "-lm") + # llvm-config --system-libs + set(llvm_system_libs "-lz" "-lrt" "-ldl" "-lpthread" "-lm") - # llvm-config --libs analysis core bitwriter mcjit orcjit - set(llvm_core_libs ${MONO_llvm_core_libs_${llvm_api_version}}) + # llvm-config --libs analysis core bitwriter mcjit orcjit + set(llvm_core_libs ${MONO_llvm_core_libs_${llvm_api_version}}) - # Check codegen libs and add needed libraries. - set(llvm_extra ${MONO_llvm_extra_libs_${llvm_codegen_libs}_${llvm_api_version}}) - if("${llvm_extra}" STREQUAL "") - message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") - endif() - - set(llvm_libs ${llvm_core_libs} ${llvm_extra}) - list(TRANSFORM llvm_libs PREPEND "${LLVM_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}") - list(TRANSFORM llvm_libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}") - else() - set(LLVM_CONFIG ${LLVM_PREFIX}/bin/llvm-config${EXE_SUFFIX}) - if (NOT EXISTS ${LLVM_CONFIG}) - message(FATAL_ERROR "LLVM executable '${LLVM_CONFIG}' not found.") - endif() - - execute_process(COMMAND ${LLVM_CONFIG} --mono-api-version RESULT_VARIABLE llvm_config_res OUTPUT_VARIABLE llvm_api_version OUTPUT_STRIP_TRAILING_WHITESPACE) - if (NOT ${llvm_config_res} EQUAL 0) - message(FATAL_ERROR "'${LLVM_CONFIG} --mono-api-version' failed. Use the llvm fork at https://github.com/dotnet/llvm-project.") - endif() - execute_process(COMMAND ${LLVM_CONFIG} --cflags OUTPUT_VARIABLE llvm_cflags OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --cxxflags OUTPUT_VARIABLE llvm_cxxflags OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --includedir OUTPUT_VARIABLE llvm_includedir OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --system-libs OUTPUT_VARIABLE llvm_system_libs_space_separated OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${LLVM_CONFIG} --libfiles analysis core bitwriter mcjit orcjit ${llvm_codegen_libs} OUTPUT_VARIABLE llvm_libs_space_separated OUTPUT_STRIP_TRAILING_WHITESPACE) - separate_arguments(llvm_system_libs NATIVE_COMMAND ${llvm_system_libs_space_separated}) - separate_arguments(llvm_libs NATIVE_COMMAND ${llvm_libs_space_separated}) + # Check codegen libs and add needed libraries. + set(llvm_extra ${MONO_llvm_extra_libs_${llvm_codegen_libs}_${llvm_api_version}}) + if("${llvm_extra}" STREQUAL "") + message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") endif() + set(llvm_libs ${llvm_core_libs} ${llvm_extra}) + list(TRANSFORM llvm_libs PREPEND "${LLVM_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}") + list(TRANSFORM llvm_libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}") + if (${llvm_api_version} LESS 1100) message(FATAL_ERROR "LLVM version too old.") endif() From f7821860b4ff381cf27e61509b774c36981bf7df Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 24 Aug 2022 09:50:30 -0400 Subject: [PATCH 16/42] Special-case wasm LLVM libs check --- src/mono/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 711b0d6edb377..1ae1f1e88d5c6 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -613,7 +613,7 @@ if(LLVM_PREFIX) # Check codegen libs and add needed libraries. set(llvm_extra ${MONO_llvm_extra_libs_${llvm_codegen_libs}_${llvm_api_version}}) - if("${llvm_extra}" STREQUAL "") + if("${llvm_extra}" STREQUAL "" AND NOT "${TARGET_ARCH}" STREQUAL "wasm") message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") endif() From 54f427e5258c66f58fefd8f4bbdf2e57a48402b6 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 24 Aug 2022 11:06:16 -0400 Subject: [PATCH 17/42] fix wrong arch LLVM used during AOT compilers on linux --- src/mono/mono.proj | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 1ca8cc2b3c829..51b053865b01a 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -768,7 +768,8 @@ <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm'">$(TargetArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' == ''">$(TargetArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) @@ -863,6 +864,11 @@ <_MonoAotCrossFilePath>$(MonoObjCrossDir)out\bin\$(MonoAotCrossFileName) <_MonoAotCrossPdbFilePath>$(MonoObjCrossDir)out\bin\$(MonoAotCrossPdbFileName) + + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' == ''">$(TargetArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) + @@ -895,16 +901,16 @@ <_MonoRuntimeArtifacts Include="$(_MonoAotCrossPdbFilePath)" Condition="Exists('$(_MonoAotCrossPdbFilePath)')"> $(RuntimeBinDir)cross\$(PackageRID)\$(MonoAotCrossPdbFileName) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\llc$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\bin\llc$(ExeSuffix)"> $(RuntimeBinDir)\llc$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\opt$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\bin\opt$(ExeSuffix)"> $(RuntimeBinDir)\opt$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\llc$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\bin\llc$(ExeSuffix)"> $(RuntimeBinDir)cross\$(PackageRID)\llc$(ExeSuffix) - <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(TargetArchitecture)\bin\opt$(ExeSuffix)"> + <_MonoRuntimeArtifacts Condition="'$(MonoAOTBundleLLVMOptimizer)' == 'true'" Include="$(MonoLLVMDir)\$(_MonoLLVMTargetArchitecture)\bin\opt$(ExeSuffix)"> $(RuntimeBinDir)cross\$(PackageRID)\opt$(ExeSuffix) <_MonoIncludeArtifacts Include="$(MonoObjDir)out\include\**" /> From 5e3999f09b5eace295d0b20bd81124a4bcef3c4d Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 24 Aug 2022 14:51:30 -0400 Subject: [PATCH 18/42] Always use compiler-init on Windows, even when we disable it for Linux/Mac --- src/mono/mono.proj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 51b053865b01a..6b42a8b963ddf 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -517,8 +517,8 @@ $([MSBuild]::EnsureTrailingSlash('$(EMSDK_PATH)')) <_MonoCMakeConfigureCommand>cmake @(_MonoCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand)' - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjDir)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) - <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' == 'true'">$(_MonoCCOption) $(_MonoCXXOption) @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(_MonoSkipInitCompiler)' == 'true' and '$(HostOS)' != 'windows'">$(_MonoCCOption) $(_MonoCXXOption) @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) + <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' != 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjDir)" && @(_MonoBuildEnv, ' ') $(_MonoCMakeConfigureCommand) <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(EMSDK_PATH)/emsdk_env.sh 2>&1 && emcmake $(_MonoCMakeConfigureCommand)' <_MonoCMakeConfigureCommand Condition="'$(TargetsBrowser)' == 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" && call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && emcmake $(_MonoCMakeConfigureCommand) @@ -798,8 +798,8 @@ <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' - <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) - <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' == 'true'">$(_MonoAOTCCOption) $(_MonoAOTCXXOption) @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' == 'true' and '$(HostOS)' != 'windows'">$(_MonoAOTCCOption) $(_MonoAOTCXXOption) @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) + <_MonoAotCMakeConfigureCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration) <_MonoAotCMakeBuildCommand Condition="'$(MonoVerboseBuild)' == 'true'">$(_MonoAotCMakeBuildCommand) --verbose <_MonoAotCMakeBuildCommand Condition="'$(_MonoUseNinja)' != 'true'">$(_MonoAotCMakeBuildCommand) --parallel $([System.Environment]::ProcessorCount) From c1f43cae63dab88a7d5353e9874aa81f2ec346b7 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 24 Aug 2022 16:15:04 -0400 Subject: [PATCH 19/42] Move the LLVM cheese --- src/mono/mono.proj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 6b42a8b963ddf..87f70d35b0419 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -767,8 +767,7 @@ <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' == ''">$(TargetArchitecture) + <_MonoLLVMTargetArchitecture>$(BuildArchitecture) <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) @@ -865,8 +864,7 @@ <_MonoAotCrossPdbFilePath>$(MonoObjCrossDir)out\bin\$(MonoAotCrossPdbFileName) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' == 'wasm'">$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' == ''">$(TargetArchitecture) + <_MonoLLVMTargetArchitecture>$(BuildArchitecture) <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) From 16340da7548e512b0be41a8830e12ce1b334e685 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 10:15:22 -0400 Subject: [PATCH 20/42] Duplicate more of llvm-config into cmake --- src/mono/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 1ae1f1e88d5c6..02715ef1ed15c 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -601,12 +601,17 @@ if(LLVM_PREFIX) string(REGEX REPLACE ".*MONO_API_VERSION ([0-9]+)" "\\1" llvm_api_version ${llvm_api_version_line}) # llvm-config --cflags - set(llvm_cflags "") - set(llvm_cxxflags "") + set(llvm_cflags "-I${LLVM_PREFIX}/include -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS") + set(llvm_cxxflags "-I{LLVM_PREFIX}/include -std=c++14 -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS") set(llvm_includedir "${LLVM_PREFIX}/include") - # llvm-config --system-libs - set(llvm_system_libs "-lz" "-lrt" "-ldl" "-lpthread" "-lm") + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # llvm-config --system-libs + set(llvm_system_libs "-lz" "-lrt" "-ldl" "-lpthread" "-lm") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # llvm-config --system-libs + set(llvm_system_libs "-lz" "-lm") + endif() # llvm-config --libs analysis core bitwriter mcjit orcjit set(llvm_core_libs ${MONO_llvm_core_libs_${llvm_api_version}}) From b446a8c38fc3623ee3b10487bcf8ecb44dedbe19 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 11:05:33 -0400 Subject: [PATCH 21/42] Tweak ItemGroup conditional --- src/mono/mono.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 87f70d35b0419..e74421de254a6 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -365,7 +365,7 @@ <_MonoCFLAGS Condition="'$(MonoWasmThreads)' != 'true'" Include="$(EscapedQuoteW)-I$([MSBuild]::NormalizePath('$(PkgMicrosoft_NETCore_Runtime_ICU_Transport)', 'runtimes', 'browser-wasm', 'native', 'include'))$(EscapedQuoteW)"/> - + <_MonoCCOption>CC="$(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" <_MonoCXXOption>CXX="$(XcodeDir)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" <_MonoSkipInitCompiler>true From e5d3084c48d0b60e10f09b2a3d295fa0f390d4f5 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 15:53:03 -0400 Subject: [PATCH 22/42] Ensure we pass through real arch during LLVM restore --- src/mono/mono.proj | 2 +- src/mono/monoaotcross.proj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index e74421de254a6..44575507ccd31 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -768,7 +768,7 @@ <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" <_MonoLLVMTargetArchitecture>$(BuildArchitecture) - <_MonoLLVMTargetArchitecture Condition="'$(TargetArchitecture)' != 'wasm' and '$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) + <_MonoLLVMTargetArchitecture Condition="'$(RealTargetArchitecture)' != ''">$(RealTargetArchitecture) diff --git a/src/mono/monoaotcross.proj b/src/mono/monoaotcross.proj index 37b5a6a2d6093..7d8b2a10a31c0 100644 --- a/src/mono/monoaotcross.proj +++ b/src/mono/monoaotcross.proj @@ -38,7 +38,7 @@ + Properties="TargetArchitecture=$(MonoAotTargetArchitecture);TargetOS=$(MonoAotTargetOS);RealTargetArchitecture=$(TargetArchitecture)" /> Date: Thu, 25 Aug 2022 15:53:55 -0400 Subject: [PATCH 23/42] Always initialize compiler when cross-compiling cross-compiler --- src/mono/mono.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 44575507ccd31..accd5f753c592 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -794,6 +794,7 @@ + <_MonoSkipInitCompiler Condition="'$(RealTargetArchitecture)' != '$(BuildArchitecture)'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' From a533b62e67043da74931c8dbb850199ef6c0faea Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 15:54:08 -0400 Subject: [PATCH 24/42] Generate cross-compiler packages on arm64 --- .../Microsoft.NETCore.App.MonoCrossAOT.sfxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj index 27a590bfd08fa..c69b3d5a6ae48 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj @@ -8,7 +8,7 @@ Microsoft.NETCore.App.Runtime.AOT.$(RuntimeIdentifier).Cross.$(TargetCrossRid) dotnet-monocrossaot monocrossaot - linux-x64;osx-x64;win-x64 + linux-x64;linux-arm64;osx-x64;osx-arm64;win-x64;win-arm64 false false tools/ From 155ef11e1d946d1ab45718904f469a1436f4470d Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 16:12:32 -0400 Subject: [PATCH 25/42] don't constantly re-copy LLVM --- src/mono/llvm/llvm-init.proj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 06498d7be88be..15704637d0322 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -65,7 +65,8 @@ + FileArch="%(PackageReference.PackageArch)" + Condition="!Exists('$(MonoLLVMDir)\%(PackageReference.PackageArch)')"/> From fc817bd231ad744cf43aba2eb3fc46b957e995a2 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 16:35:17 -0400 Subject: [PATCH 26/42] Revert "don't constantly re-copy LLVM" This reverts commit 155ef11e1d946d1ab45718904f469a1436f4470d. --- src/mono/llvm/llvm-init.proj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 15704637d0322..06498d7be88be 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -65,8 +65,7 @@ + FileArch="%(PackageReference.PackageArch)" /> From 71d602bdb555d4d3c0bdb4a070a2c1ce06e38fbd Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 17:07:32 -0400 Subject: [PATCH 27/42] Fix Linux WASM --- src/mono/mono.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index accd5f753c592..65e66b51dce8e 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -794,7 +794,7 @@ - <_MonoSkipInitCompiler Condition="'$(RealTargetArchitecture)' != '$(BuildArchitecture)'">false + <_MonoSkipInitCompiler Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != '$(BuildArchitecture)'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' From a8e6f3bf7c326e333c0a7498187349a2aa5d68bb Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 25 Aug 2022 19:04:29 -0400 Subject: [PATCH 28/42] Fix building browser-wasm for osx-arm64 on osx-x64 --- src/mono/llvm/llvm-init.proj | 4 +++- src/mono/mono.proj | 41 ++++++------------------------------ 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 06498d7be88be..1fd56554c8aee 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -66,8 +66,10 @@ + + - diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 65e66b51dce8e..a3fec3b69a990 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -640,7 +640,13 @@ + + + <_MonoAOTCFLAGS Condition="'$(RealTargetArchitecture)' == 'arm64'" Include="-arch arm64" /> + <_MonoAOTCXXFLAGS Condition="'$(RealTargetArchitecture)' == 'arm64'" Include="-arch arm64" /> + + <_MonoAotBuildEnv Condition="'$(BuildArchitecture)' == 'arm64'" Include="arch -arch arm64" /> @@ -725,45 +731,12 @@ - - - <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=arm" /> - <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/arm-linux-gnueabihf/pkgconfig" /> - - - - - <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=armv6" /> - <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/arm-linux-gnueabihf/pkgconfig" /> - - - + <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=arm64" /> <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/aarch64-linux-gnu/pkgconfig" /> - - - - <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=riscv64" /> - <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/riscv64-linux-gnu/pkgconfig" /> - - - - - - <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=s390x" /> - <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/s390x-linux-gnu/pkgconfig" /> - - - - - - <_MonoAotBuildEnv Include="TARGET_BUILD_ARCH=ppc64le" /> - <_MonoAotBuildEnv Include="PKG_CONFIG_PATH=$(MonoCrossDir)/usr/lib/powerpc64le-linux-gnu/pkgconfig" /> - - <_MonoAOTCFLAGSOption>-DCMAKE_C_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCFLAGS, ' ')" <_MonoAOTCXXFLAGSOption>-DCMAKE_CXX_FLAGS="@(_MonoAOTCPPFLAGS, ' ') @(_MonoAOTCXXFLAGS, ' ')" From a1663d029db3a63a3752799119410b9dcc50a8a5 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Fri, 26 Aug 2022 09:28:11 -0400 Subject: [PATCH 29/42] Get rid of debug output --- src/mono/llvm/llvm-init.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 06498d7be88be..2a2ebd41af208 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -67,7 +67,6 @@ - From 14bfd80010cd6316ef9199f7dfa612442d6af863 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Fri, 26 Aug 2022 15:13:21 -0400 Subject: [PATCH 30/42] Let's not kid ourselves: Mono doesn't work on Windows ARM64 at all --- .../Microsoft.NETCore.App.MonoCrossAOT.sfxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj index c69b3d5a6ae48..d4fb082c167a1 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.MonoCrossAOT.sfxproj @@ -8,7 +8,7 @@ Microsoft.NETCore.App.Runtime.AOT.$(RuntimeIdentifier).Cross.$(TargetCrossRid) dotnet-monocrossaot monocrossaot - linux-x64;linux-arm64;osx-x64;osx-arm64;win-x64;win-arm64 + linux-x64;linux-arm64;osx-x64;osx-arm64;win-x64 false false tools/ From 73cc736bf49928276411da687d8e9226e61272d1 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Fri, 26 Aug 2022 15:18:15 -0400 Subject: [PATCH 31/42] Add what works to CI --- eng/pipelines/runtime-official.yml | 42 ++++++++++++++++++++++++++++++ eng/pipelines/runtime.yml | 20 ++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index d011ddb32f28f..5e2eb46a688fe 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -220,6 +220,27 @@ stages: extraStepsParameters: name: MonoRuntimePacks + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - Linux_arm64 + jobParameters: + buildArgs: -s mono+packs -c $(_BuildConfig) + /p:MonoCrossAOTTargetOS=Browser /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + nameSuffix: CrossAOT_Mono + runtimeVariant: crossaot + dependsOn: + - mono_browser_offsets + monoCrossAOTTargetOS: + - Browser + isOfficialBuild: ${{ variables.isOfficialBuild }} + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml + extraStepsParameters: + name: MonoRuntimePacks + - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml @@ -272,6 +293,27 @@ stages: extraStepsParameters: name: MonoRuntimePacks + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - OSX_arm64 + jobParameters: + buildArgs: -s mono+packs -c $(_BuildConfig) + /p:MonoCrossAOTTargetOS=Browser /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + nameSuffix: CrossAOT_Mono + runtimeVariant: crossaot + dependsOn: + - mono_browser_offsets + monoCrossAOTTargetOS: + - Browser + isOfficialBuild: ${{ variables.isOfficialBuild }} + extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml + extraStepsParameters: + name: MonoRuntimePacks + # # Build Mono LLVM runtime packs # diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 9dc55e45cc6b8..0fe6194fb20ea 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -694,6 +694,26 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isRollingBuild'], true)) +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/mono/templates/build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - Linux_arm64 + - OSX_arm64 + jobParameters: + runtimeVariant: crossaot + dependsOn: + - mono_browser_offsets + monoCrossAOTTargetOS: + - Browser + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # # Build Mono release # Only when libraries or mono changed From fd586307320c9f01395a53c1df4249e3bac57219 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Mon, 26 Sep 2022 17:06:01 -0400 Subject: [PATCH 32/42] Merge errors --- src/mono/CMakeLists.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 9a9e444ffb1cd..2930af90ce145 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -604,7 +604,7 @@ if(LLVM_PREFIX) # llvm-config --cflags set(llvm_cflags "-I${LLVM_PREFIX}/include -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS") - set(llvm_cxxflags "-I{LLVM_PREFIX}/include -std=c++14 -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS") + set(llvm_cxxflags "-I${LLVM_PREFIX}/include -std=c++14 -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STD_FORMAT_MACROS -D__STDC_LIMIT_MACROS") set(llvm_includedir "${LLVM_PREFIX}/include") if(CMAKE_SYSTEM_NAME STREQUAL "Linux") @@ -628,19 +628,6 @@ if(LLVM_PREFIX) list(TRANSFORM llvm_libs PREPEND "${LLVM_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}") list(TRANSFORM llvm_libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}") - # llvm-config --libs analysis core bitwriter mcjit orcjit - set(llvm_core_libs ${MONO_llvm_core_libs_${llvm_api_version}}) - - # Check codegen libs and add needed libraries. - set(llvm_extra ${MONO_llvm_extra_libs_${llvm_codegen_libs}_${llvm_api_version}}) - if("${llvm_extra}" STREQUAL "" AND NOT "${TARGET_ARCH}" STREQUAL "wasm") - message(FATAL_ERROR "FIXME: ${TARGET_ARCH}") - endif() - - set(llvm_libs ${llvm_core_libs} ${llvm_extra}) - list(TRANSFORM llvm_libs PREPEND "${LLVM_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}") - list(TRANSFORM llvm_libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}") - if (${llvm_api_version} LESS 1100) message(FATAL_ERROR "LLVM version too old.") endif() From 36e20b9ddb6525d5c04ad1bfd346b82779e8a903 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Mon, 26 Sep 2022 17:16:51 -0400 Subject: [PATCH 33/42] Build wasm offsets --- eng/pipelines/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index b6ac71425baf3..9e48c09634faa 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -314,7 +314,7 @@ jobs: buildConfig: release platforms: - Android_x64 - #- Browser_wasm - unused + - Browser_wasm - tvOS_arm64 - iOS_arm64 - MacCatalyst_x64 From c45b4eba1b40b6f03465cae9c576e4f38bcfb3ce Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 27 Sep 2022 15:45:30 -0400 Subject: [PATCH 34/42] Patch from Ankit to enable workload build testing --- eng/pipelines/common/evaluate-default-paths.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index be1e09f93e207..23de3a6d1e75c 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -157,11 +157,13 @@ jobs: - eng/Versions.props - eng/testing/scenarios/BuildWasmAppsJobsList.txt - eng/testing/workloads-testing.targets + - src/installer/pkg/sfx/Microsoft.NETCore.App/* - src/libraries/sendtohelix* - src/libraries/System.Net.WebSockets.Client/* - src/libraries/System.Runtime.InteropServices/* - src/libraries/System.Runtime.InteropServices.JavaScript/* - src/mono/mono/* + - src/mono/monoaotcross.proj - src/mono/nuget/Microsoft.NET.Runtime.MonoAOTCompiler.Task/* - src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/* - src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/* From 6d845db95f2bfae299a59b35924704a921801bb3 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 3 Jan 2023 09:51:40 -0500 Subject: [PATCH 35/42] Reconcile change from #77304 --- src/mono/mono.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index bba6385f1a99f..94ffc01424447 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -770,7 +770,7 @@ <_MonoSkipInitCompiler Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != '$(BuildArchitecture)'">false <_MonoAotCrossOffsetsCommand Condition="'$(MonoUseCrossTool)' == 'true'">$(PythonCmd) $(MonoProjectRoot)mono/tools/offsets-tool/offsets-tool.py @(MonoAotCrossOffsetsToolParams, ' ') <_MonoAotCMakeConfigureCommand>cmake @(MonoAOTCMakeArgs, ' ') $(MonoCMakeExtraArgs) "$(MonoProjectRoot.TrimEnd('\/'))" - <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">bash -c 'source $(RepositoryEngineeringCommonDir)native/init-compiler.sh "$(RepositoryEngineeringCommonDir)native" "$(_CompilerTargetArch)" "$(MonoCCompiler)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' + <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' != 'true' and '$(HostOS)' != 'windows'">sh -c 'build_arch="$(_CompilerTargetArch)" compiler="$(MonoCCompiler)" . "$(RepositoryEngineeringCommonDir)native/init-compiler.sh" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand)' <_MonoAotCMakeConfigureCommand Condition="'$(_MonoSkipInitCompiler)' == 'true' and '$(HostOS)' != 'windows'">$(_MonoAOTCCOption) $(_MonoAOTCXXOption) @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeConfigureCommand Condition="'$(HostOS)' == 'windows'">call "$(RepositoryEngineeringDir)native\init-vs-env.cmd" $(_CompilerTargetArch) && cd /D "$(MonoObjCrossDir)" && @(_MonoAotBuildEnv, ' ') $(_MonoAotCMakeConfigureCommand) <_MonoAotCMakeBuildCommand>cmake --build . --target install --config $(Configuration) From 4f75c0215f6e49040bf829179dffa5200f094597 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 3 Jan 2023 09:57:26 -0500 Subject: [PATCH 36/42] Fix up Versions.props issues for LLVM on ARM Mac --- eng/Version.Details.xml | 10 +++++++++- eng/Versions.props | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 004ed0317d909..0bd8a0127db8c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -234,7 +234,15 @@ https://github.com/dotnet/llvm-project ea445e4b536e801e88ffddaa2ea485d07ee72a2b - + + https://github.com/dotnet/llvm-project + ea445e4b536e801e88ffddaa2ea485d07ee72a2b + + + https://github.com/dotnet/llvm-project + ea445e4b536e801e88ffddaa2ea485d07ee72a2b + + https://github.com/dotnet/llvm-project ea445e4b536e801e88ffddaa2ea485d07ee72a2b diff --git a/eng/Versions.props b/eng/Versions.props index 88db9340548a6..430aafc754356 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -228,6 +228,8 @@ 14.0.0-alpha.1.22613.1 14.0.0-alpha.1.22613.1 14.0.0-alpha.1.22613.1 + 14.0.0-alpha.1.22613.1 + 14.0.0-alpha.1.22613.1 14.0.0-alpha.1.22613.1 14.0.0-alpha.1.22613.1 From 8e47d22ea22c6d0211a051c03be97622e14d0f1e Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 3 Jan 2023 09:59:18 -0500 Subject: [PATCH 37/42] Reconcile more changes from osx.11.0-arm64->osx-arm64 change --- src/mono/llvm/llvm-init.proj | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 2c9b8887613d1..091cd7bd438e2 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -38,22 +38,6 @@ PackageArch="$(BuildArchitecture)" Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(BuildArchitecture)' != 'wasm'" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> - - <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> - <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> - - - - <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> - <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" - Version="$(MonoLLVMToolsVersion)" - PackageArch="arm64"/> - - - <_PackageReferenceDeduplicated Remove="runtime.osx.10.12-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> - <_PackageReferenceDeduplicated Include="runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" - Version="$(MonoLLVMSDKVersion)" - PackageArch="arm64"/> @@ -64,9 +48,6 @@ - - From ae0770472577de34493334ba02fc9f249beecad8 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 3 Jan 2023 15:32:12 -0500 Subject: [PATCH 38/42] Add missing offset generation job --- eng/pipelines/runtime.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index a402c1e3090a5..cf5e09293ea31 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -311,7 +311,7 @@ extends: buildConfig: release platforms: - Android_x64 - #- Browser_wasm - unused + - Browser_wasm - tvOS_arm64 - iOS_arm64 - MacCatalyst_x64 @@ -1408,4 +1408,4 @@ extends: extraStepsParameters: name: SourceBuildPackages timeoutInMinutes: 95 - condition: eq(variables['isRollingBuild'], true) \ No newline at end of file + condition: eq(variables['isRollingBuild'], true) From 3cfaebe9169d8a9d6140cb5e37e6b55705e2daea Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Tue, 3 Jan 2023 17:47:09 -0500 Subject: [PATCH 39/42] Exclude arm32 LLVM, as well as x86 --- src/mono/llvm/llvm-init.proj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index 091cd7bd438e2..d527232a394ca 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -16,27 +16,27 @@ + Condition="'$(TargetArchitecture)' != '' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'wasm'" /> + Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(RealTargetArchitecture)' != 'wasm'" /> + Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(BuildArchitecture)' != 'wasm'" /> + Condition="'$(TargetArchitecture)' != '' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'wasm'" /> + Condition="'$(RealTargetArchitecture)' != '' and '$(RealTargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(RealTargetArchitecture)' != 'wasm'" /> + Condition="'$(BuildArchitecture)' != '' and '$(BuildArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm' and '$(BuildArchitecture)' != 'wasm'" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> From 241ccbc49ed289befa901050d0bed59d14f9e8de Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 4 Jan 2023 09:33:36 -0500 Subject: [PATCH 40/42] This seems to work better --- src/mono/llvm/llvm-init.proj | 51 +++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/src/mono/llvm/llvm-init.proj b/src/mono/llvm/llvm-init.proj index d527232a394ca..c7351f4f8d055 100644 --- a/src/mono/llvm/llvm-init.proj +++ b/src/mono/llvm/llvm-init.proj @@ -16,32 +16,69 @@ + Condition="'$(TargetArchitecture)' != ''" /> + Condition="'$(RealTargetArchitecture)' != ''" /> + Condition="'$(BuildArchitecture)' != ''" /> + Condition="'$(TargetArchitecture)' != ''" /> + Condition="'$(RealTargetArchitecture)' != ''" /> + Condition="'$(BuildArchitecture)' != ''" /> <_PackageReferenceDeduplicated Include="@(PackageReference->Distinct())" /> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" + Version="$(MonoLLVMToolsVersion)" + PackageArch="$(BuildArchitecture)"/> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-arm.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" + Version="$(MonoLLVMSDKVersion)" + PackageArch="$(BuildArchitecture)"/> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-x86.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" + Version="$(MonoLLVMToolsVersion)" + PackageArch="$(BuildArchitecture)"/> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-x86.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" + Version="$(MonoLLVMSDKVersion)" + PackageArch="$(BuildArchitecture)"/> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-wasm.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" + Version="$(MonoLLVMToolsVersion)" + PackageArch="$(BuildArchitecture)"/> + + + <_PackageReferenceDeduplicated Remove="runtime.$(MonoLLVMHostOS)-wasm.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" /> + <_PackageReferenceDeduplicated Include="runtime.$(MonoLLVMHostOS)-$(BuildArchitecture).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" + Version="$(MonoLLVMSDKVersion)" + PackageArch="$(BuildArchitecture)"/> + - + From 0830b802b312f94f4562e8518ab07149306c0c39 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 5 Jan 2023 10:37:56 -0500 Subject: [PATCH 41/42] Urgh --- eng/Versions.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index a01f3bfa4df03..f00231fa675e0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -228,8 +228,8 @@ 14.0.0-alpha.1.22626.2 14.0.0-alpha.1.22626.2 14.0.0-alpha.1.22626.2 - 14.0.0-alpha.1.22626.2 - 14.0.0-alpha.1.22626.2 + 14.0.0-alpha.1.22626.2 + 14.0.0-alpha.1.22626.2 14.0.0-alpha.1.22626.2 14.0.0-alpha.1.22626.2 From 2b328581dbec0f67fdf16b5f0d9a88fc5d718a77 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 5 Jan 2023 10:41:53 -0500 Subject: [PATCH 42/42] Point Browser osx-arm64 workload at osx-arm64 cross compiler package --- .../WorkloadManifest.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in index 998a79a6bdf80..5d6ec2c4b9528 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in @@ -367,7 +367,7 @@ "win-arm64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm", "linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm", "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm", - "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm" + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.browser-wasm" } }, "Microsoft.NETCore.App.Runtime.Mono.browser-wasm" : {