From 4e1ad9c0d65e5759488a0afa4f4e9dffc601f74e Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:01:48 +0300 Subject: [PATCH] Pass RID to msbuild task (#103508) --- eng/Subsets.props | 8 ++++++- .../tools/aot/ILCompiler/ILCompiler.csproj | 23 ++++++++----------- .../aot/crossgen2/crossgen2_publish.csproj | 15 ++++-------- .../Microsoft.NETCore.App.Crossgen2.sfxproj | 2 -- src/native/managed/compile-native.proj | 19 ++------------- 5 files changed, 23 insertions(+), 44 deletions(-) diff --git a/eng/Subsets.props b/eng/Subsets.props index 41f63f11bbd79..68569344a6ea0 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -121,7 +121,8 @@ <_NativeAotSupportedOS Condition="'$(TargetOS)' == 'windows' or '$(TargetOS)' == 'linux' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'freebsd'">true <_NativeAotSupportedArch Condition="'$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' == 'x86')">true - true + true + true true @@ -286,7 +287,12 @@ AdditionalProperties="%(AdditionalProperties); ClrCrossComponentsSubset=true; HostArchitecture=$(BuildArchitecture); + TargetArchitecture=$(TargetArchitecture); HostCrossOS=$(HostOS); + HostOS=$(HostOS); + TargetOS=$(TargetOS); + RuntimeIdentifier=$(RuntimeIdentifier); + NETCoreSdkPortableRuntimeIdentifier=$(NETCoreSdkPortableRuntimeIdentifier); PgoInstrument=false; NoPgoOptimize=true; CrossBuild=false; diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj index 823dab33c645c..ffab9cbb1289b 100644 --- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj +++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj @@ -10,20 +10,15 @@ $(RuntimeBinDir)ilc-published/ - false - false - false - - false - true - $(ROOTFS_DIR) - true - true - true + true + $(ROOTFS_DIR) + true + true + true true - + @@ -53,7 +48,7 @@ clang @@ -75,7 +70,7 @@ <_XcodeVersion>$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*')) - + @@ -86,7 +81,7 @@ - + diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj index 3fbdc4590fdc1..aebad93eae08e 100644 --- a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj +++ b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj @@ -7,11 +7,6 @@ - false - false - false - - false true $(PackageRID) true @@ -21,7 +16,7 @@ - + true true @@ -41,7 +36,7 @@ - + $(CoreCLRILCompilerDir) $(CoreCLRCrossILCompilerDir) $(ROOTFS_DIR) @@ -58,12 +53,12 @@ false - + + Condition="'$(UseNativeAotForComponents)' == 'true'" /> @@ -91,7 +86,7 @@ clang diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj index 8d492718edd92..c9d40b79d38db 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj @@ -15,8 +15,6 @@ true false - - false diff --git a/src/native/managed/compile-native.proj b/src/native/managed/compile-native.proj index bcda8c5d6b57b..ef7b427944efc 100644 --- a/src/native/managed/compile-native.proj +++ b/src/native/managed/compile-native.proj @@ -13,26 +13,11 @@ - - - - false - - false - - false - - false - false - true - false - - $(ROOTFS_DIR) lld - --gcc-toolchain=$(ROOTFS_DIR)/usr + --gcc-toolchain=$(ROOTFS_DIR)/usr @@ -51,6 +36,6 @@ ReferenceOutputAssembly="false" AdditionalProperties="%(AdditionalProperties);$(SplitSubprojectProps)" Targets="LinkNative" - Condition="$(SupportsNativeAotComponents)"/> + Condition="'$(UseNativeAotForComponents)' == 'true'"/>