From 36cda3750f8698b813743e9d29208f39f1d8cec1 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Mon, 5 Dec 2022 16:11:28 -0800 Subject: [PATCH] look for portable RID runtime packages by default --- .../job/source-build-build-tarball.yml | 2 +- .../tarball/content/repos/runtime.proj | 1 + .../source-build-reference-packages.proj | 2 +- ...portable-runtime-packages-by-default.patch | 41 +++++++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/SourceBuild/tarball/patches/runtime/0001-Look-for-portable-runtime-packages-by-default.patch diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml index 9ae170d1c95c..7e0e20d02097 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml @@ -41,7 +41,7 @@ jobs: - group: AzureDevOps-Artifact-Feeds-Pats - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - name: additionalBuildArgs - value: --with-sdk /tarball/.dotnet + value: --with-sdk /tarball/.dotnet -- /p:UseNonPortableIlasmPackageOverride=true - name: tarballDir ${{ if eq(parameters.installerBuildResourceId, '') }}: value: $(Build.SourcesDirectory) diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj index 85d0efa77c24..e95142d6ae31 100644 --- a/src/SourceBuild/tarball/content/repos/runtime.proj +++ b/src/SourceBuild/tarball/content/repos/runtime.proj @@ -23,6 +23,7 @@ $(BuildCommandArgs) /p:RuntimeOS=$(RuntimeOS) $(BuildCommandArgs) /p:BaseOS=$(BaseOS) $(BuildCommandArgs) /p:SourceBuildNonPortable=true + $(BuildCommandArgs) /p:UseNonPortableIlasmPackageOverride=true $(StandardSourceBuildCommand) $(BuildCommandArgs) diff --git a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj index c1321e716c4c..4eaf5e1a1b02 100644 --- a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj +++ b/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj @@ -5,7 +5,7 @@ $(BaseIntermediatePath)source-build-reference-package-cache $(StandardSourceBuildArgs) - $(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier) + $(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier) $(BuildCommandArgs) /p:LocalNuGetPackageCacheDirectory=$(LocalNuGetPackageCacheDirectory) $(StandardSourceBuildCommand) $(BuildCommandArgs) diff --git a/src/SourceBuild/tarball/patches/runtime/0001-Look-for-portable-runtime-packages-by-default.patch b/src/SourceBuild/tarball/patches/runtime/0001-Look-for-portable-runtime-packages-by-default.patch new file mode 100644 index 000000000000..de4b7e332fb0 --- /dev/null +++ b/src/SourceBuild/tarball/patches/runtime/0001-Look-for-portable-runtime-packages-by-default.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Logan Bussell +Date: Mon, 5 Dec 2022 15:59:59 -0800 +Subject: [PATCH] Look for portable runtime packages by default + +Change the default behavior to look for portable RID runtime packages (like +ilasm). If previous source-built artifacts contain non-portable runtime +packages, build .NET source-build with the +` -- /p:UseNonPortableIlasmPackageOverride=true` argument. + +This patch should not be in the release of .NET Source-build 7.0.102. +--- + Directory.Build.targets | 2 +- + eng/SourceBuild.props | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Directory.Build.targets b/Directory.Build.targets +index ef9e5f5810c..c6469821345 100644 +--- a/Directory.Build.targets ++++ b/Directory.Build.targets +@@ -16,7 +16,7 @@ + When .NET gets built from source, make the SDK aware there are bootstrap packages + for Microsoft.NETCore.App.Runtime. and Microsoft.NETCore.App.Crossgen2.. + --> +- ++ + + $(PackageRID) + +diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props +index 32e6d9c0bad..57b822d4ef1 100644 +--- a/eng/SourceBuild.props ++++ b/eng/SourceBuild.props +@@ -51,6 +51,7 @@ + $(InnerBuildArgs) /p:DisableSourceLink=false + $(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS) + $(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono ++ $(InnerBuildArgs) /p:UseNonPortableIlasmPackageOverride=true + + +