mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-05 05:42:14 +02:00
community/dotnet8-stage0: upgrade to 8.0.107
This commit is contained in:
parent
ad3b130662
commit
b3a70ea334
@ -1,21 +1,21 @@
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
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 '/<TestCliNuGetDirectoryTargetFramework/d' -i "$builddir"/src/sdk/src/Layout/redist/targets/GenerateLayout.targets
|
||||
}
|
||||
|
||||
_init() {
|
||||
export _InitializeDotNetCli=$_cli_root
|
||||
export DOTNET_INSTALL_DIR=$_cli_root
|
||||
export DOTNET_PATH=$_cli_root
|
||||
export DotnetTool=$_cli_root/dotnet
|
||||
export PATH="$_cli_root:$PATH"
|
||||
export NUGET_PACKAGES=$_nugetdir
|
||||
export DotNetBuildFromSource=true
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||
export SHELL=/bin/bash
|
||||
@ -216,8 +227,6 @@ _runtime() {
|
||||
"
|
||||
if [ "$CBUILD" != "$CHOST" ]; then
|
||||
local args="$args -cross"
|
||||
# https://github.com/dotnet/runtime/pull/75597 broke crossbuilding when true
|
||||
local DotNetBuildFromSource=false
|
||||
# x86 build of mono broken, thus do not build mono
|
||||
case $_dotnet_target in
|
||||
x86) local args="$args /p:DefaultSubsets=clr+libs+host+packs";;
|
||||
@ -226,7 +235,7 @@ _runtime() {
|
||||
if [ "$_runtimever" != "${_runtimever##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_runtimever##*-}"
|
||||
fi
|
||||
DotNetBuildFromSource=$DotNetBuildFromSource ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
|
||||
ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
@ -296,7 +305,7 @@ _aspnetcore() {
|
||||
riscv64|x86) local args="$args /p:CrossgenOutput=false";;
|
||||
esac
|
||||
|
||||
./eng/build.sh --pack $args
|
||||
DotNetBuildFromSource=true ./eng/build.sh --pack $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
@ -372,14 +381,14 @@ bootstrap() {
|
||||
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
|
||||
--no-same-owner
|
||||
|
||||
local _iltoolsArray="
|
||||
local _iltools_array="
|
||||
runtime.*.Microsoft.NETCore.TestHost.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILAsm.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILDAsm.*.nupkg
|
||||
"
|
||||
|
||||
local _nupkgsArray="
|
||||
$_iltoolsArray
|
||||
local _nupkgs_array="
|
||||
$_iltools_array
|
||||
Microsoft.NETCore.App.Host.*.*.nupkg
|
||||
Microsoft.NETCore.App.Runtime.*.*.nupkg
|
||||
Microsoft.NETCore.App.Crossgen2.*.*.nupkg
|
||||
@ -391,12 +400,12 @@ bootstrap() {
|
||||
"
|
||||
|
||||
# copies artifacts to artifacts dir for use by future dotnet builds
|
||||
for i in $_nupkgsArray; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ || true; done
|
||||
for i in $_nupkgs_array; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ || true; done
|
||||
|
||||
msg "Changing iltools version to $_iltoolsver"
|
||||
# source-build expects a certain version of ilasm, ildasm and testhost
|
||||
# following adjusts version
|
||||
for i in $_iltoolsArray; do
|
||||
for i in $_iltools_array; do
|
||||
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$pkgver/$i
|
||||
local nupath=$(find $nupath || true)
|
||||
local nupkg="${nupath##*/}"
|
||||
@ -443,16 +452,18 @@ artifacts() {
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ee816265db13968fadbc981daf6d4435b6c227184b104f8ca3be952dddbe2c68efc57ca7210adc2567d4126f4179c7e839d279113b5acb58e3469631708ab9f2 dotnet-tarball-v8.0.3.tar.gz
|
||||
6ba64033486ca5030011fc89fe4be778df84708545e4dbb718537201cedd2f0562a4e702591376facddf7c16f810a9a2545ff96c64138b986994d8d5275aac1a dotnet-release-v8.0.3.json
|
||||
4792107d445e8b9c8480f3771f0c4697a119586c55d05a8814e4ee97459bad8042f649a1719a37c7772f6707bae70e33477112d7b7ebb035c04866b6635e1dd8 dotnet-sdk-8.0.103-linux-musl-x64.noextract
|
||||
3c83259178a053d1b12dfd296dac8981fce30f773e7dc59062bfc0491e76d2537d85419a890ba3658bfd70554e0591270bc920995de2959397e6446e801c4956 dotnet-sdk-8.0.103-linux-musl-arm64.noextract
|
||||
83cef7d126034034331baca68d96b5fe892940ac80f9dc4451252cc74f3d281c67d1422f8d767759a566e1ff386c2cecc86f4e32b62c5928ec603d1919b7e058 dotnet-sdk-8.0.103-linux-musl-arm.noextract
|
||||
4817a4d7355a3deba625015ec9d948d0ad51cd26be03d87d55626aa2f10bfb6812f837b8cf3d14c1f4619ac294c8dc61e94586ff440165d5aad4d6b8c84d5062 Private.SourceBuilt.Artifacts.8.0.103-servicing.24117.1.centos.8-x64.noextract
|
||||
8fe67e9d5ebd79b82c3d99059bed8c933cea1802a622250f8dede24a9ed815c6764509b3f683187998e9ad1cd12699f28f4438d13eead2b744ea8e1751690198 dotnet-tarball-v8.0.7.tar.gz
|
||||
b3c6390f9aa3531b7dc288ab0a7511e6d5342a5fa226089db3397f8b0c7f55a8f5382a6c192c056112aaa8a69e98b91b8829a3975bf643d6147182a3ffeff8a0 dotnet-release-v8.0.7.json
|
||||
f25c95f9acff4db16593541fda517c32477eb618dc9ad5b3983a4ab5bd62fdd3c03c7d9f56afe1132aff5137bbdc4161e0b83f7c8101cb1766b82ed4072becef dotnet-sdk-8.0.107-linux-musl-x64.noextract
|
||||
5b99a07607cae652e4b392c17a7856ffb5df939e95d741d07c385d422e5511394567b5102213da1dc65183680d0e908d83c43c95b14bfabec305ca7731d9d676 dotnet-sdk-8.0.107-linux-musl-arm64.noextract
|
||||
e6e6325c6292bf435a0771c33eaf330dc132a11372ea6d12427f5a6c24cb6db260d95b1dfbba3c232cf9d5166f61192a05c7e3be4210a05a6687634fb0a887c6 dotnet-sdk-8.0.107-linux-musl-arm.noextract
|
||||
e0e2896cf493f3165e4fab56f8c13004280303efb20b6fe5c99d0072183f3605f80fceabf926ca7302bfd438d50ea76ba3dea459a7edc8cd9df5de66b9224410 Private.SourceBuilt.Artifacts.8.0.107-servicing.24317.1.centos.9-x64.noextract
|
||||
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
c983a1ab7f06ac86691e0fa7a61fcad69a074d984ef4a4116bee43f20be918215963c7ec8ddd7edd70432b29b160ff78288183acc89fda15ce4a75bfdbf99ee3 runtime_83682-specify-notext-on-linux-musl-x86.patch
|
||||
3354fa721809f1b94c579408ee78004ff3ca2ba79212c1a0ecc424a9955bb5d5a80c115d4c30dd257526f356ea76f0562db6f83d8dd0b6135f8c689886b3348d runtime_90251-rename-mono-cmake-host-var.patch
|
||||
887112eb2b103eadd6887529ebae7f9a75df2c2cb168e84fd40cc09f9bcd20917d428bbba06968b07b0a463890da82b1b2b1d033a3dd016e6494067464ae6f74 runtime_more-clang-16-suppression.patch
|
||||
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
|
||||
e748953eeeb13963f4e680fe6d38a5d0d1fc34b45fe9c62ba0b15ea647b23be826aaa7dd6466765c554bfed491b36c5822ac6f71b377dd95f31e16e6e75e0661 runtime_100781-fix-mono-build-on-arm.patch
|
||||
5b882e17c92a040a784742f637a19e7c09f10ed9e922436eaedaf0e2238e31fd67547821d073eaff6f7f61110be44af9d9e1786b6227659f72e8e1e549f6f540 runtime_reverse-101869-transition-1es-template-work.patch
|
||||
8348b51168709cd1f9e946dbfb02eaf3088d7c68e986390cf5fd861a057e188064013fbc008aa1e12d19d12b9ad7a4091732cd1b0fb8b629ef2a880718def5a7 runtime_disable-crossgen-on-riscv64.patch
|
||||
93454767eaa812ac39b38b04764bd41480fea9b5a78f32d2ea1baa072a20eb31d302c475e8737b0fb2a3b8a6f47567795ddd0a7603369e90e7c5944b11357b00 runtime_disable-local-exec-tls-riscv64.patch
|
||||
"
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
From fd893cb25d0d764e681aa88c5f1ed18233860039 Mon Sep 17 00:00:00 2001
|
||||
From: Adeel <3840695+am11@users.noreply.github.com>
|
||||
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")
|
||||
@ -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 @@
|
||||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
|
||||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
|
||||
<!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
|
||||
- <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
|
||||
+ <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true' and '$(TargetArchitecture)' != 'riscv64'">true</PublishTrimmed>
|
||||
<RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != '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</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers>
|
||||
<SelfContained>false</SelfContained>
|
||||
@ -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<void*>(&__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.
|
||||
@ -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)
|
||||
@ -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;
|
||||
@ -0,0 +1,268 @@
|
||||
--- b/src/runtime/eng/Subsets.props
|
||||
+++ a/src/runtime/eng/Subsets.props
|
||||
@@ -342,7 +342,7 @@
|
||||
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
|
||||
|
||||
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
|
||||
+ <ProjectToBuild Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != ''" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
|
||||
- <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_inbuild.csproj" Category="clr" />
|
||||
|
||||
<ProjectToBuild Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'linux' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')) or '$(TargetOS)' == 'osx'" Include="$(CoreClrProjectRoot)tools\SuperFileCheck\SuperFileCheck.csproj" Category="clr" />
|
||||
</ItemGroup>
|
||||
--- 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'))" />
|
||||
<PackageReference Remove="@(PackageReference)"
|
||||
Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Runtime'))" />
|
||||
- <PackageDownload Remove="@(PackageDownload)"
|
||||
- Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Crossgen2'))" />
|
||||
- <PackageReference Remove="@(PackageReference)"
|
||||
- Condition="'$(UsePackageDownload)' != 'true' and $([System.String]::Copy('%(Identity)').StartsWith('$(LocalFrameworkOverrideName).Crossgen2'))" />
|
||||
<PackageDownload Remove="@(PackageDownload)"
|
||||
Condition="'$(UsePackageDownload)' == 'true' and $([System.String]::Copy('%(Identity)').EndsWith('Microsoft.DotNet.ILCompiler'))" />
|
||||
<PackageReference Remove="@(PackageReference)"
|
||||
--- b/src/runtime/src/coreclr/crossgen-corelib.proj
|
||||
+++ a/src/runtime/src/coreclr/crossgen-corelib.proj
|
||||
@@ -5,7 +5,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
+ <ProjectReference Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2.csproj" Condition="'$(UseCrossArchCrossgen2)' != 'true'" OutputItemType="Crossgen2" />
|
||||
+ <ProjectReference Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2_crossarch.csproj" Condition="'$(UseCrossArchCrossgen2)' == 'true'" OutputItemType="Crossgen2" />
|
||||
- <ProjectReference Include="$(CoreClrProjectRoot)/tools/aot/crossgen2/crossgen2_inbuild.csproj" OutputItemType="Crossgen2" />
|
||||
<ProjectReference Include="$(CoreClrProjectRoot)/tools/dotnet-pgo/dotnet-pgo.csproj" OutputItemType="DotNetPgo" Condition="'$(DotNetBuildFromSource)' != 'true'" />
|
||||
<ProjectReference Include="$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))" OutputItemType="CoreLib" />
|
||||
</ItemGroup>
|
||||
--- b/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
|
||||
+++ a/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
|
||||
@@ -12,7 +12,6 @@
|
||||
<PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
|
||||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
|
||||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
|
||||
- <NativeAotSupported Condition="$(OutputRID.StartsWith('tizen')) == 'true'">false</NativeAotSupported>
|
||||
<!-- Disable native AOT on FreeBSD when cross building from Linux. -->
|
||||
<NativeAotSupported Condition="'$(TargetOS)' == 'freebsd' and '$(CrossBuild)' == 'true'">false</NativeAotSupported>
|
||||
<PublishAot Condition="'$(NativeAotSupported)' == 'true'">true</PublishAot>
|
||||
--- b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
|
||||
+++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
|
||||
@@ -1,14 +1,113 @@
|
||||
+<Project>
|
||||
+
|
||||
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
+
|
||||
-<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
+ <OutputPath>$(RuntimeBinDir)crossgen2</OutputPath>
|
||||
+ <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
|
||||
+ <NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
|
||||
+ <!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
|
||||
+ <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
|
||||
+ <RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != '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</RuntimeIdentifiers>
|
||||
+ <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers>
|
||||
+ <SelfContained>false</SelfContained>
|
||||
+ <SelfContained Condition="'$(_IsPublishing)' == 'true'">true</SelfContained>
|
||||
- <OutputPath>$(RuntimeBinDir)/crossgen2</OutputPath>
|
||||
- <UseAppHost>false</UseAppHost>
|
||||
- <!--
|
||||
- When building crossgen2, we don't have the live ref and runtime packs.
|
||||
- So even though we'll run against the live-built runtime,
|
||||
- we need to compile against the "Tool Current" runtime, which is the latest
|
||||
- that ships with the SDK that we build with.
|
||||
- -->
|
||||
- <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
|
||||
</PropertyGroup>
|
||||
+
|
||||
<Import Project="crossgen2.props" />
|
||||
+
|
||||
+ <PropertyGroup Condition="'$(NativeAotSupported)' != 'true'">
|
||||
+ <PublishSingleFile>true</PublishSingleFile>
|
||||
+ <PublishReadyToRun>true</PublishReadyToRun>
|
||||
+ <!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. -->
|
||||
+ <PublishReadyToRun Condition="'$(TargetOS)' == 'netbsd' Or '$(TargetOS)' == 'illumos' Or '$(TargetOS)' == 'solaris'">false</PublishReadyToRun>
|
||||
+ <!-- Disable crossgen on FreeBSD when cross building from Linux. -->
|
||||
+ <PublishReadyToRun Condition="'$(TargetOS)' == 'freebsd' and '$(CrossBuild)' == 'true'">false</PublishReadyToRun>
|
||||
+ <PublishReadyToRunComposite>true</PublishReadyToRunComposite>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
+
|
||||
+ <PropertyGroup Condition="'$(NativeAotSupported)' == 'true'">
|
||||
+ <IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
|
||||
+ <IlcToolsPath Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(EnableNativeSanitizers)' != ''">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
|
||||
+ <SysRoot Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
|
||||
+ <IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>
|
||||
+ <IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
|
||||
+ <IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath>
|
||||
+ <IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath>
|
||||
+ <TrimmerSingleWarn>false</TrimmerSingleWarn>
|
||||
+ <!-- Use .dwarf files instead of .dsym files since our symbol exporting may not safely handle folders. -->
|
||||
+ <NativeSymbolExt>.dwarf</NativeSymbolExt>
|
||||
+ <DsymUtilOptions>--flat</DsymUtilOptions>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
|
||||
+ <CustomLinkerArg Condition="'$(CrossBuild)' == 'true' and '$(_hostArchitecture)' == '$(_targetArchitecture)' and '$(_IsApplePlatform)' != 'true' and '$(_hostOS)' != 'windows'" Include="--gcc-toolchain=$(ROOTFS_DIR)/usr" />
|
||||
+ </ItemGroup>
|
||||
+
|
||||
+ <Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" />
|
||||
+ <Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets"
|
||||
+ Condition="'$(NativeAotSupported)' == 'true' and '$(_IsPublishing)' == 'true'" />
|
||||
+ <Import Project="$(RepositoryEngineeringDir)nativeSanitizers.targets" />
|
||||
+
|
||||
+ <Target Name="RewriteRuntimePackDir"
|
||||
+ Condition="'$(_IsPublishing)' == 'true'"
|
||||
+ DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
|
||||
+ BeforeTargets="ResolveRuntimePackAssets">
|
||||
+ <ItemGroup>
|
||||
+ <!-- Remove AspNetCore runtime pack since we don't build it locally -->
|
||||
+ <ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" />
|
||||
+
|
||||
+ <ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)">
|
||||
+ <PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory>
|
||||
+ </ResolvedRuntimePack>
|
||||
+ </ItemGroup>
|
||||
+ </Target>
|
||||
+
|
||||
+ <!-- Needed for the amd64 -> amd64 musl cross-build to pass the target flag. -->
|
||||
+ <Target Name="_FixIlcTargetTriple"
|
||||
+ AfterTargets="SetupOSSpecificProps"
|
||||
+ Condition="'$(CrossBuild)' == 'true' and '$(HostOS)' != 'windows'">
|
||||
+ <!-- Compute CrossCompileRid, and copy the downstream logic as-is. -->
|
||||
+ <PropertyGroup>
|
||||
+ <CrossCompileRid>$(RuntimeIdentifier)</CrossCompileRid>
|
||||
+
|
||||
+ <CrossCompileArch />
|
||||
+ <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-x64'))">x86_64</CrossCompileArch>
|
||||
+ <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' != 'true'">aarch64</CrossCompileArch>
|
||||
+ <CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-arm64')) and '$(_IsApplePlatform)' == 'true'">arm64</CrossCompileArch>
|
||||
+
|
||||
+ <TargetTriple />
|
||||
+ <TargetTriple Condition="'$(CrossCompileArch)' != ''">$(CrossCompileArch)-linux-gnu</TargetTriple>
|
||||
+ <TargetTriple Condition="'$(CrossCompileArch)' != '' and ($(CrossCompileRid.StartsWith('linux-musl')) or $(CrossCompileRid.StartsWith('alpine')))">$(CrossCompileArch)-alpine-linux-musl</TargetTriple>
|
||||
+ <TargetTriple Condition="'$(CrossCompileArch)' != '' and ($(CrossCompileRid.StartsWith('freebsd')))">$(CrossCompileArch)-unknown-freebsd12</TargetTriple>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <ItemGroup>
|
||||
+ <LinkerArg Include="--target=$(TargetTriple)" Condition="'$(_IsApplePlatform)' != 'true' and '$(TargetTriple)' != ''" />
|
||||
+ </ItemGroup>
|
||||
+ </Target>
|
||||
+
|
||||
+ <Target Name="LocateNativeCompiler"
|
||||
+ Condition="'$(NativeAotSupported)' == 'true' and '$(_IsPublishing)' == 'true' and '$(HostOS)' != 'windows'"
|
||||
+ BeforeTargets="SetupOSSpecificProps">
|
||||
+ <PropertyGroup>
|
||||
+ <CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <Exec Command="sh -c 'build_arch="$(TargetArchitecture)" compiler="$(CppCompilerAndLinker)" . "$(RepositoryEngineeringDir)/common/native/init-compiler.sh" && echo "$CC;$LDFLAGS"' 2>/dev/null"
|
||||
+ EchoOff="true"
|
||||
+ ConsoleToMsBuild="true"
|
||||
+ StandardOutputImportance="Low">
|
||||
+ <Output TaskParameter="ConsoleOutput" PropertyName="_CC_LDFLAGS" />
|
||||
+ </Exec>
|
||||
+
|
||||
+ <PropertyGroup>
|
||||
+ <CppLinker>$(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))</CppLinker>
|
||||
+ <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))</_LDFLAGS>
|
||||
+ <LinkerFlavor Condition="$(_LDFLAGS.Contains('lld'))">lld</LinkerFlavor>
|
||||
+ </PropertyGroup>
|
||||
+ </Target>
|
||||
+
|
||||
</Project>
|
||||
--- b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.props
|
||||
+++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.props
|
||||
@@ -3,6 +3,7 @@
|
||||
<AssemblyName>crossgen2</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<OutputType>Exe</OutputType>
|
||||
+ <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
|
||||
<NoWarn>8002,NU1701</NoWarn>
|
||||
<Platforms>x64;x86;arm64;arm;loongarch64</Platforms>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
--- 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 @@
|
||||
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Archives" Version="$(MicrosoftDotNetBuildTasksArchivesVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
- <ItemGroup>
|
||||
- <ProjectReference
|
||||
- Include="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj"
|
||||
- AdditionalProperties="_IsPublishing=true
|
||||
- ;RuntimeIdentifier=$(PackageRID)
|
||||
- ;NativeAotSupported=$(NativeAotSupported)
|
||||
- ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
|
||||
- ;ObjCopyName=$(ObjCopyName)
|
||||
- ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets"
|
||||
- Targets="Publish;PublishItemsOutputGroup"
|
||||
- OutputItemType="_RawCrossgenPublishFiles"
|
||||
- ReferenceOutputAssembly="false" />
|
||||
- </ItemGroup>
|
||||
-
|
||||
<Target Name="PublishCrossgen"
|
||||
BeforeTargets="GetFilesToPackage">
|
||||
+
|
||||
+ <!-- Copy System.Private.CoreLib from the coreclr bin directory to the runtime pack directory,
|
||||
+ as we always need the copy of System.Private.CoreLib that matches exactly with the runtime. -->
|
||||
+ <Copy SourceFiles="$(CoreCLRArtifactsPath)System.Private.CoreLib.dll"
|
||||
+ DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
|
||||
+ SkipUnchangedFiles="true" />
|
||||
+
|
||||
+ <MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
|
||||
+ Targets="Restore"
|
||||
+ Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())
|
||||
+ ;_IsPublishing=true
|
||||
+ ;RuntimeIdentifier=$(PackageRID)
|
||||
+ ;NativeAotSupported=$(NativeAotSupported)
|
||||
+ ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
|
||||
+ ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets" />
|
||||
+
|
||||
+ <MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
|
||||
+ Targets="Publish;PublishItemsOutputGroup"
|
||||
+ Properties="_IsPublishing=true
|
||||
+ ;RuntimeIdentifier=$(PackageRID)
|
||||
+ ;NativeAotSupported=$(NativeAotSupported)
|
||||
+ ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
|
||||
+ ;ObjCopyName=$(ObjCopyName)
|
||||
+ ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets">
|
||||
+ <Output TaskParameter="TargetOutputs"
|
||||
+ ItemName="_RawCrossgenPublishFiles" />
|
||||
+ </MSBuild>
|
||||
+
|
||||
<ItemGroup>
|
||||
<_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 @@
|
||||
|
||||
<!-- The following property group can be simplified once runtime repo switches over to SDK 6.0 drop -->
|
||||
<PropertyGroup>
|
||||
+ <CrossDir />
|
||||
+ <CrossDir Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)'">$(BuildArchitecture)</CrossDir>
|
||||
+ <Crossgen2Dll>$(CoreCLRArtifactsPath)\$(CrossDir)\crossgen2\crossgen2.dll</Crossgen2Dll>
|
||||
- <Crossgen2Dll>$(CoreCLRArtifactsPath)\$(BuildArchitecture)\crossgen2\crossgen2.dll</Crossgen2Dll>
|
||||
|
||||
<PublishReadyToRunUseCrossgen2>true</PublishReadyToRunUseCrossgen2>
|
||||
<PublishReadyToRunCrossgen2ExtraArgs>@(PublishReadyToRunCrossgen2ExtraArgsList)</PublishReadyToRunCrossgen2ExtraArgs>
|
||||
--- /dev/null
|
||||
+++ a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2_crossarch.csproj
|
||||
@@ -0,0 +1,8 @@
|
||||
+<Project Sdk="Microsoft.NET.Sdk">
|
||||
+ <PropertyGroup>
|
||||
+ <CrossHostArch>$(BuildArchitecture)</CrossHostArch>
|
||||
+ <OutputPath>$(RuntimeBinDir)/$(CrossHostArch)/crossgen2</OutputPath>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
+ </PropertyGroup>
|
||||
+ <Import Project="crossgen2.props" />
|
||||
+</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user