From a2bb086305671bde7b23646aa6d19ebed2c018c2 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 14 Jan 2025 14:21:30 -0800 Subject: [PATCH 1/4] Build our in-build ILC like how we build our in-build Crossgen2 so we can easily publish it. --- eng/Publishing.props | 3 +++ eng/liveBuilds.targets | 2 +- eng/testing/linker/trimmingTests.targets | 3 +-- eng/testing/tests.singlefile.targets | 3 +-- .../aot/ILCompiler/ILCompiler_inbuild.csproj | 20 +++++++++++++++---- src/tests/Directory.Build.targets | 3 +-- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/eng/Publishing.props b/eng/Publishing.props index 05a7d2e907063d..fa67bcba6faabf 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -15,6 +15,9 @@ + + true + true + true + true + false diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 2aa41bd5137c0a..85404d96386aee 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -565,8 +565,7 @@ false - $(CoreCLRILCompilerDir) - $(CoreCLRCrossILCompilerDir) + $(CoreCLRCrossILCompilerDir) $(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll $(CoreCLRAotSdkDir) $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir) From 5602a6979e5bcd953d8d1bc79b4459d4414d1997 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 14 Jan 2025 14:58:18 -0800 Subject: [PATCH 2/4] Produce a package for the in-build ILC --- eng/Subsets.props | 3 +- .../Microsoft.DotNet.ILCompiler.pkgproj | 53 ++++++++++++++++--- .../pkg/projects/nativeaot-packages.proj | 1 + 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/eng/Subsets.props b/eng/Subsets.props index 445ec9865a12fc..a62b9c4b901d86 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -581,6 +581,7 @@ <_BuildHostPack Condition="'$(DotNetBuildAllRuntimePacks)' == 'true' and '$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and '$(TargetArchitecture)' == 'arm')">true <_BuildBundle Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">true <_BuildBundle Condition="'$(DotNetBuildAllRuntimePacks)' == 'true' and '$(TargetsMobile)' != 'true' and !('$(TargetsLinuxBionic)' == 'true' and '$(TargetArchitecture)' == 'arm')">true + true @@ -601,7 +602,7 @@ When we're building in the VMR, we need to provide a crossgen2 that runs on the host machine for downstream repos to use to R2R their code. In non-VMR builds, downstream repos can use the crossgen2 built for the target host SDK from another build leg, but in the VMR we need to provide one to use. --> - + diff --git a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index ace888b2942962..4208cd41d11aff 100644 --- a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -17,13 +17,55 @@ false true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BeforeTargets="GetPackageFiles" + Condition="'$(PackHostILCompiler)' != 'true' and '$(PackageTargetRuntime)' != ''"> - + @@ -32,7 +74,7 @@ - + @@ -40,11 +82,6 @@ - - - - - diff --git a/src/installer/pkg/projects/nativeaot-packages.proj b/src/installer/pkg/projects/nativeaot-packages.proj index aca5d44d7b5bce..fc00d78b0c5b12 100644 --- a/src/installer/pkg/projects/nativeaot-packages.proj +++ b/src/installer/pkg/projects/nativeaot-packages.proj @@ -5,6 +5,7 @@ + From 0f55c82d27daa8deb1dd308f5682788658e517ca Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 14 Jan 2025 15:20:31 -0800 Subject: [PATCH 3/4] Only mark the host packages as IsShipping=false at publish time. We want them to build with the same versions as shipping packages to ensure versions flow as expected (and we don't break when stabilizing versions) --- eng/Publishing.props | 6 ++++-- .../Microsoft.DotNet.ILCompiler.pkgproj | 1 - .../Microsoft.NETCore.App.Crossgen2.Host.sfxproj | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/Publishing.props b/eng/Publishing.props index fa67bcba6faabf..b55ab641082fe7 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -14,10 +14,12 @@ + Visibility="Vertical" + IsShipping="false" /> + Visibility="Vertical" + IsShipping="false" /> true - false $(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj $(NETCoreSdkRuntimeIdentifier) - false From 3ae3105cee2cd2945723a9e06a3bfc79f47c332e Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 15 Jan 2025 10:48:51 -0800 Subject: [PATCH 4/4] Always build ILCompiler_inbuild --- eng/Subsets.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Subsets.props b/eng/Subsets.props index a62b9c4b901d86..eb22c48bc12356 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -391,7 +391,7 @@ - +