From b3a70ea334ff31586620a095fce23948370bf64d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 25 Jul 2024 10:01:28 -0400 Subject: [PATCH] community/dotnet8-stage0: upgrade to 8.0.107 --- community/dotnet8-stage0/APKBUILD | 81 +++--- ...runtime_100781-fix-mono-build-on-arm.patch | 109 +++++++ .../runtime_disable-crossgen-on-riscv64.patch | 13 + ...ntime_disable-local-exec-tls-riscv64.patch | 38 +++ .../runtime_more-clang-16-suppression.patch | 13 - .../runtime_remove-usage-of-off64-t.patch | 26 -- ...-101869-transition-1es-template-work.patch | 268 ++++++++++++++++++ 7 files changed, 474 insertions(+), 74 deletions(-) create mode 100644 community/dotnet8-stage0/runtime_100781-fix-mono-build-on-arm.patch create mode 100644 community/dotnet8-stage0/runtime_disable-crossgen-on-riscv64.patch create mode 100644 community/dotnet8-stage0/runtime_disable-local-exec-tls-riscv64.patch delete mode 100644 community/dotnet8-stage0/runtime_more-clang-16-suppression.patch delete mode 100644 community/dotnet8-stage0/runtime_remove-usage-of-off64-t.patch create mode 100644 community/dotnet8-stage0/runtime_reverse-101869-transition-1es-template-work.patch diff --git a/community/dotnet8-stage0/APKBUILD b/community/dotnet8-stage0/APKBUILD index b35f6c05ce3..7f15f846b4d 100644 --- a/community/dotnet8-stage0/APKBUILD +++ b/community/dotnet8-stage0/APKBUILD @@ -1,21 +1,21 @@ # Contributor: Antoine Martin (ayakael) # Maintainer: Antoine Martin (ayakael) pkgname=dotnet8-stage0 -pkgver=8.0.103 +pkgver=8.0.107 pkgrel=0 [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" # Tag of tarball generator. -_gittag=v8.0.3 +_gittag=v8.0.7 # Versions of prebuilt artifacts and bootstrap tar -_artifactsver="8.0.103-servicing.24117.1.centos.8-x64" -_bootstrapver="8.0.103" +_artifactsver="8.0.107-servicing.24317.1.centos.9-x64" +_bootstrapver="8.0.107" _bootstraprel=0 -_runtimever=8.0.3 -_aspnetver=8.0.3 -_installerver=8.0.103 +_installerver=8.0.107 +_runtimever=8.0.7 +_aspnetver=8.0.7 # Patches to be used. String before '_' refers to repo to patch # Look for patch notes within each patch for what they fix / where they come from @@ -25,8 +25,10 @@ _patches=" runtime_82269-mono-thread-coop-undefine-fortify-source.patch runtime_83682-specify-notext-on-linux-musl-x86.patch runtime_90251-rename-mono-cmake-host-var.patch - runtime_more-clang-16-suppression.patch - runtime_remove-usage-of-off64-t.patch + runtime_100781-fix-mono-build-on-arm.patch + runtime_reverse-101869-transition-1es-template-work.patch + runtime_disable-crossgen-on-riscv64.patch + runtime_disable-local-exec-tls-riscv64.patch " _pkgver_macro=${pkgver%.*} @@ -42,7 +44,7 @@ arch="all !x86 !armhf !riscv64 !s390x !ppc64le !loongarch64" _giturl=https://github.com/dotnet/dotnet url=https://dotnet.microsoft.com license="MIT" -options="!check net" # Testsuite in main -build aport +options="!check net" # Testsuite in main runtime aport subpackages=" dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch dotnet$_pkgver_name-stage0-bootstrap @@ -70,6 +72,7 @@ makedepends_host=" gcc grep icu-dev + icu-data-full krb5-dev libintl libstdc++ @@ -140,9 +143,9 @@ prepare() { mkdir -p "$_cli_root" mkdir -p $_packagesdir $_downloaddir $_outputdir $_nugetdir $_logdir - # sdk insists on downloading its own dotnet unless ArcadeBuildFromSource + # sdk and installer insists on downloading its own dotnet unless ArcadeBuildFromSource # is true, which opens up a can of worms - sed 's|ArcadeBuildFromSource=true|Architecture|' -i src/sdk/eng/restore-toolset.sh + sed 's|ArcadeBuildFromSource=true|Architecture|' -i src/*/eng/restore-toolset.sh # links logfiles to pipeline logs for easy pickup in pipelines mkdir -p "$_logdir" "$builddir"/artifacts @@ -158,11 +161,17 @@ prepare() { tar -xf "$srcdir"/dotnet-sdk-$_pkgver_macro*$_dotnet_arch.noextract -C "$_cli_root" --no-same-owner - # adjusts sdk version and packagedir to expected - for i in runtime sdk installer aspnetcore roslyn; do - $_nuget add source $_packagesdir --name local --configfile "$builddir"/src/$i/NuGet.config - tmp=$(mktemp) - jq ".sdk.version = \"$_bootstrapver\"" "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json + local components="$(find "$builddir"/src -maxdepth 1 -mindepth 1 -type d -exec basename '{}' \;)" + for i in $components; do + if [ -f "$builddir/src/$i/NuGet.config" ]; then + $_nuget add source $_packagesdir --name local --configfile "$builddir"/src/$i/NuGet.config + fi + if [ -f "$builddir/src/$i/global.json" ]; then + tmp=$(mktemp) + jq ".tools.dotnet = \"$_bootstrapver\"" "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json + jq 'del(.sdk.version)' "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json + jq 'del(.tools.runtimes)' "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json + fi done # extracting PackageVersions.props as some version information is there @@ -171,12 +180,14 @@ prepare() { # sdk looks for TestCli at wrong place sed '/ +Date: Mon, 8 Apr 2024 20:42:09 +0300 +Subject: [PATCH 1/3] Fix mono build on alpine arm + +--- + src/mono/CMakeLists.txt | 6 +++--- + src/mono/mono/mini/mini-arm.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt +index d46df3a77a3b8..7e7548f3d73c7 100644 +--- a/src/runtime/src/mono/CMakeLists.txt ++++ b/src/runtime/src/mono/CMakeLists.txt +@@ -330,13 +330,13 @@ elseif(TARGET_SYSTEM_NAME STREQUAL "ios" OR TARGET_SYSTEM_NAME STREQUAL "tvos") + elseif(TARGET_SYSTEM_NAME STREQUAL "tvos") + set(TARGET_TVOS 1) + endif() +-elseif(TARGET_SYSTEM_NAME STREQUAL "linux") ++elseif(CLR_CMAKE_TARGET_LINUX_MUSL) + set(TARGET_UNIX 1) + set(TARGET_LINUX 1) +-elseif(TARGET_SYSTEM_NAME STREQUAL "alpine") ++ set(TARGET_LINUX_MUSL 1) ++elseif(TARGET_SYSTEM_NAME STREQUAL "linux") + set(TARGET_UNIX 1) + set(TARGET_LINUX 1) +- set(TARGET_LINUX_MUSL 1) + elseif(TARGET_SYSTEM_NAME STREQUAL "android") + set(TARGET_UNIX 1) + set(TARGET_LINUX_BIONIC 1) +diff --git a/src/runtime/src/mono/mono/mini/mini-arm.h b/src/runtime/src/mono/mono/mini/mini-arm.h +index 73bcc8bb8bb4b..1d1a6af8b67a5 100644 +--- a/src/runtime/src/mono/mono/mini/mini-arm.h ++++ b/src/runtime/src/mono/mono/mini/mini-arm.h +@@ -371,7 +371,7 @@ typedef struct MonoCompileArch { + #define MONO_ARCH_HAVE_INTERP_PINVOKE_TRAMP 1 + #define MONO_ARCH_HAVE_INTERP_NATIVE_TO_MANAGED 1 + +-#if defined(TARGET_WATCHOS) || (defined(__linux__) && !defined(TARGET_ANDROID)) ++#if defined(TARGET_WATCHOS) || (defined(__linux__) && !defined(TARGET_ANDROID) && !defined(TARGET_LINUX_MUSL)) + #define MONO_ARCH_DISABLE_HW_TRAPS 1 + #define MONO_ARCH_HAVE_UNWIND_BACKTRACE 1 + #endif + +From b180c8231599e5db439664063501927e78787516 Mon Sep 17 00:00:00 2001 +From: Adeel Mujahid <3840695+am11@users.noreply.github.com> +Date: Mon, 8 Apr 2024 22:32:34 +0300 +Subject: [PATCH 2/3] Update src/mono/CMakeLists.txt + +--- + src/mono/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt +index 7e7548f3d73c7..ca7ef9b6e8354 100644 +--- a/src/runtime/src/mono/CMakeLists.txt ++++ b/src/runtime/src/mono/CMakeLists.txt +@@ -330,7 +330,7 @@ elseif(TARGET_SYSTEM_NAME STREQUAL "ios" OR TARGET_SYSTEM_NAME STREQUAL "tvos") + elseif(TARGET_SYSTEM_NAME STREQUAL "tvos") + set(TARGET_TVOS 1) + endif() +-elseif(CLR_CMAKE_TARGET_LINUX_MUSL) ++elseif(TARGET_SYSTEM_NAME STREQUAL "alpine" OR CLR_CMAKE_TARGET_LINUX_MUSL) + set(TARGET_UNIX 1) + set(TARGET_LINUX 1) + set(TARGET_LINUX_MUSL 1) + +From 1e66f4ed3972485548fe3fac3b2a31ba5af65dc5 Mon Sep 17 00:00:00 2001 +From: Adeel Mujahid <3840695+am11@users.noreply.github.com> +Date: Mon, 8 Apr 2024 23:57:20 +0300 +Subject: [PATCH 3/3] Update CMakeLists.txt + +--- + src/mono/CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt +index ca7ef9b6e8354..47dc6aecf82c6 100644 +--- a/src/runtime/src/mono/CMakeLists.txt ++++ b/src/runtime/src/mono/CMakeLists.txt +@@ -330,13 +330,6 @@ elseif(TARGET_SYSTEM_NAME STREQUAL "ios" OR TARGET_SYSTEM_NAME STREQUAL "tvos") + elseif(TARGET_SYSTEM_NAME STREQUAL "tvos") + set(TARGET_TVOS 1) + endif() +-elseif(TARGET_SYSTEM_NAME STREQUAL "alpine" OR CLR_CMAKE_TARGET_LINUX_MUSL) +- set(TARGET_UNIX 1) +- set(TARGET_LINUX 1) +- set(TARGET_LINUX_MUSL 1) +-elseif(TARGET_SYSTEM_NAME STREQUAL "linux") +- set(TARGET_UNIX 1) +- set(TARGET_LINUX 1) + elseif(TARGET_SYSTEM_NAME STREQUAL "android") + set(TARGET_UNIX 1) + set(TARGET_LINUX_BIONIC 1) +@@ -344,6 +337,13 @@ elseif(TARGET_SYSTEM_NAME STREQUAL "android") + if (CMAKE_BUILD_TYPE STREQUAL "Release") + add_compile_options(-O2) + endif() ++elseif(CLR_CMAKE_TARGET_LINUX_MUSL) ++ set(TARGET_UNIX 1) ++ set(TARGET_LINUX 1) ++ set(TARGET_LINUX_MUSL 1) ++elseif(TARGET_SYSTEM_NAME STREQUAL "linux") ++ set(TARGET_UNIX 1) ++ set(TARGET_LINUX 1) + elseif(TARGET_SYSTEM_NAME STREQUAL "emscripten") + set(TARGET_BROWSER 1) + if (CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/community/dotnet8-stage0/runtime_disable-crossgen-on-riscv64.patch b/community/dotnet8-stage0/runtime_disable-crossgen-on-riscv64.patch new file mode 100644 index 00000000000..11d92449764 --- /dev/null +++ b/community/dotnet8-stage0/runtime_disable-crossgen-on-riscv64.patch @@ -0,0 +1,13 @@ +diff --git a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +index 657ac23590a..06fc4c983c6 100644 +--- a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj ++++ b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +@@ -7,7 +7,7 @@ + + false + +- true ++ true + linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64 + $(PackageRID) + false diff --git a/community/dotnet8-stage0/runtime_disable-local-exec-tls-riscv64.patch b/community/dotnet8-stage0/runtime_disable-local-exec-tls-riscv64.patch new file mode 100644 index 00000000000..682a3f4a9ef --- /dev/null +++ b/community/dotnet8-stage0/runtime_disable-local-exec-tls-riscv64.patch @@ -0,0 +1,38 @@ +diff --git a/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S b/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S +index 85ee7c3..3390603 100644 +--- a/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S ++++ b/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S +@@ -965,6 +965,6 @@ NESTED_END OnCallCountThresholdReachedStub, _TEXT + + // Load offset of native thread local variable `t_ThreadStatics` in TCB and return it in `a0` register. + LEAF_ENTRY GetThreadStaticsVariableOffset, _TEXT +- la.tls.ie a0, t_ThreadStatics ++ la.tls.gd a0, t_ThreadStatics + EPILOG_RETURN + LEAF_END GetThreadStaticsVariableOffset, _TEXT +diff --git a/src/runtime/src/coreclr/jit/helperexpansion.cpp b/src/runtime/src/coreclr/jit/helperexpansion.cpp +index 529bbfd..f3acffd 100644 +--- a/src/runtime/src/coreclr/jit/helperexpansion.cpp ++++ b/src/runtime/src/coreclr/jit/helperexpansion.cpp +@@ -491,7 +491,7 @@ bool Compiler::fgExpandThreadLocalAccessForCall(BasicBlock** pBlock, Statement* + } + else + { +-#ifdef TARGET_ARM ++#if defined(TARGET_ARM) || defined(TARGET_RISCV64) + // On Arm, Thread execution blocks are accessed using co-processor registers and instructions such + // as MRC and MCR are used to access them. We do not support them and so should never optimize the + // field access using TLS. +diff --git a/src/runtime/src/coreclr/vm/jitinterface.cpp b/src/runtime/src/coreclr/vm/jitinterface.cpp +index 1cc6c37..cbb7a73 100644 +--- a/src/runtime/src/coreclr/vm/jitinterface.cpp ++++ b/src/runtime/src/coreclr/vm/jitinterface.cpp +@@ -1437,7 +1437,7 @@ void CEEInfo::getThreadLocalStaticBlocksInfo (CORINFO_THREAD_STATIC_BLOCKS_INFO* + pInfo->tlsGetAddrFtnPtr = reinterpret_cast(&__tls_get_addr); + pInfo->tlsIndexObject = GetTlsIndexObjectAddress(); + +-#elif defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) ++#elif defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) + + // For Linux arm64/loongarch64/riscv64, just get the offset of thread static variable, and during execution, + // this offset, arm64 taken from trpid_elp0 system register gives back the thread variable address. diff --git a/community/dotnet8-stage0/runtime_more-clang-16-suppression.patch b/community/dotnet8-stage0/runtime_more-clang-16-suppression.patch deleted file mode 100644 index 1e94419844e..00000000000 --- a/community/dotnet8-stage0/runtime_more-clang-16-suppression.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake -index c9a54547c0a..931da2cae5b 100644 ---- a/src/runtime/eng/native/configurecompiler.cmake -+++ b/src/runtime/eng/native/configurecompiler.cmake -@@ -488,6 +488,8 @@ if (CLR_CMAKE_HOST_UNIX) - # other clang 16.0 suppressions - add_compile_options(-Wno-single-bit-bitfield-constant-conversion) - add_compile_options(-Wno-cast-function-type-strict) -+ add_compile_options(-Wno-incompatible-function-pointer-types-strict) -+ add_compile_options(-Wno-ignored-attributes) - else() - add_compile_options(-Wno-uninitialized) - add_compile_options(-Wno-strict-aliasing) diff --git a/community/dotnet8-stage0/runtime_remove-usage-of-off64-t.patch b/community/dotnet8-stage0/runtime_remove-usage-of-off64-t.patch deleted file mode 100644 index cec58772971..00000000000 --- a/community/dotnet8-stage0/runtime_remove-usage-of-off64-t.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp -index 20b2494..165b190 100644 ---- a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig -+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp -@@ -469,7 +469,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r - // performance optimization. - m_canUseProcVmReadSyscall = false; - assert(m_fdMem != -1); -- *read = pread64(m_fdMem, buffer, size, (off64_t)address); -+ *read = pread(m_fdMem, buffer, size, (off_t)address); - } - - if (*read == (size_t)-1) -diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp -index 5addb79..79655d1 100644 ---- a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig -+++ b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp -@@ -760,7 +760,7 @@ CrashInfo::PageMappedToPhysicalMemory(uint64_t start) - } - - uint64_t pagemapOffset = (start / PAGE_SIZE) * sizeof(uint64_t); -- uint64_t seekResult = lseek64(m_fdPagemap, (off64_t) pagemapOffset, SEEK_SET); -+ uint64_t seekResult = lseek(m_fdPagemap, (off_t) pagemapOffset, SEEK_SET); - if (seekResult != pagemapOffset) - { - int seekErrno = errno; diff --git a/community/dotnet8-stage0/runtime_reverse-101869-transition-1es-template-work.patch b/community/dotnet8-stage0/runtime_reverse-101869-transition-1es-template-work.patch new file mode 100644 index 00000000000..5af232aad1d --- /dev/null +++ b/community/dotnet8-stage0/runtime_reverse-101869-transition-1es-template-work.patch @@ -0,0 +1,268 @@ +--- b/src/runtime/eng/Subsets.props ++++ a/src/runtime/eng/Subsets.props +@@ -342,7 +342,7 @@ + + + ++ +- + + + +--- b/src/runtime/eng/targetingpacks.targets ++++ a/src/runtime/eng/targetingpacks.targets +@@ -35,7 +35,7 @@ + LatestRuntimeFrameworkVersion="$(ProductVersion)" + RuntimeFrameworkName="$(LocalFrameworkOverrideName)" + RuntimePackNamePatterns="$(LocalFrameworkOverrideName).Runtime.**RID**" ++ RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86" +- RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm64;win-x64;win-x86;linux-musl-arm;osx-arm64;maccatalyst-x64;maccatalyst-arm64;linux-s390x;linux-bionic-arm;linux-bionic-arm64;linux-bionic-x64;linux-bionic-x86;freebsd-x64;freebsd-arm64" + TargetFramework="$(NetCoreAppCurrent)" + TargetingPackName="$(LocalFrameworkOverrideName).Ref" + TargetingPackVersion="$(ProductVersion)" +@@ -104,10 +104,6 @@ + Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Runtime'))" /> + +- +- + + + + ++ ++ +- + + + +--- b/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj ++++ a/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj +@@ -12,7 +12,6 @@ + $(RuntimeBinDir)ilc-published/ + + false +- false + + false + true +--- b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj ++++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +@@ -1,14 +1,113 @@ ++ ++ ++ ++ +- + ++ $(RuntimeBinDir)crossgen2 ++ ++ false ++ ++ true ++ linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64 ++ $(PackageRID) ++ false ++ true +- $(RuntimeBinDir)/crossgen2 +- false +- +- $(NetCoreAppToolCurrent) + ++ + ++ ++ ++ true ++ true ++ ++ false ++ ++ false ++ true ++ ++ ++ ++ ++ ++ $(CoreCLRILCompilerDir) ++ $(CoreCLRCrossILCompilerDir) ++ $(ROOTFS_DIR) ++ $(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll ++ $(CoreCLRAotSdkDir) ++ $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir) ++ $(MicrosoftNetCoreAppRuntimePackNativeDir) ++ false ++ ++ .dwarf ++ --flat ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ $(MicrosoftNetCoreAppRuntimePackDir) ++ ++ ++ ++ ++ ++ ++ ++ ++ $(RuntimeIdentifier) ++ ++ ++ x86_64 ++ aarch64 ++ arm64 ++ ++ ++ $(CrossCompileArch)-linux-gnu ++ $(CrossCompileArch)-alpine-linux-musl ++ $(CrossCompileArch)-unknown-freebsd12 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ clang ++ ++ ++ ++ ++ ++ ++ ++ $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';')))) ++ <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1)))) ++ lld ++ ++ ++ + +--- b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.props ++++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.props +@@ -3,6 +3,7 @@ + crossgen2 + true + Exe ++ $(NetCoreAppToolCurrent) + 8002,NU1701 + x64;x86;arm64;arm;loongarch64 + AnyCPU +--- b/src/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj ++++ a/src/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj +@@ -28,22 +28,36 @@ + + + +- +- +- +- + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + <_CrossgenPublishFiles Include="@(_RawCrossgenPublishFiles->'%(OutputPath)')" + KeepMetadata="REMOVE_ALL" /> +--- b/src/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets ++++ a/src/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets +@@ -14,7 +14,9 @@ + + + ++ ++ $(BuildArchitecture) ++ $(CoreCLRArtifactsPath)\$(CrossDir)\crossgen2\crossgen2.dll +- $(CoreCLRArtifactsPath)\$(BuildArchitecture)\crossgen2\crossgen2.dll + + true + @(PublishReadyToRunCrossgen2ExtraArgsList) +--- /dev/null ++++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_crossarch.csproj +@@ -0,0 +1,8 @@ ++ ++ ++ $(BuildArchitecture) ++ $(RuntimeBinDir)/$(CrossHostArch)/crossgen2 ++ false ++ ++ ++