|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Logan Bussell <loganbussell@microsoft.com> |
| 3 | +Date: Mon, 5 Dec 2022 15:59:59 -0800 |
| 4 | +Subject: [PATCH] Look for portable runtime packages by default |
| 5 | + |
| 6 | +Change the default behavior to look for portable RID runtime packages (like |
| 7 | +ilasm). If previous source-built artifacts contain non-portable runtime |
| 8 | +packages, build .NET source-build with the |
| 9 | +` -- /p:UseNonPortableIlasmPackageOverride=true` argument. |
| 10 | + |
| 11 | +This patch should not be in the release of .NET Source-build 7.0.102. |
| 12 | +--- |
| 13 | + Directory.Build.targets | 2 +- |
| 14 | + eng/SourceBuild.props | 1 + |
| 15 | + 2 files changed, 2 insertions(+), 1 deletion(-) |
| 16 | + |
| 17 | +diff --git a/Directory.Build.targets b/Directory.Build.targets |
| 18 | +index ef9e5f5810c..c6469821345 100644 |
| 19 | +--- a/Directory.Build.targets |
| 20 | ++++ b/Directory.Build.targets |
| 21 | +@@ -16,7 +16,7 @@ |
| 22 | + When .NET gets built from source, make the SDK aware there are bootstrap packages |
| 23 | + for Microsoft.NETCore.App.Runtime.<rid> and Microsoft.NETCore.App.Crossgen2.<rid>. |
| 24 | + --> |
| 25 | +- <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'"> |
| 26 | ++ <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true' and '$(UseNonPortableIlasmPackageOverride)' == 'true'"> |
| 27 | + <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))"> |
| 28 | + <RuntimePackRuntimeIdentifiers>$(PackageRID)</RuntimePackRuntimeIdentifiers> |
| 29 | + </KnownFrameworkReference> |
| 30 | +diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props |
| 31 | +index 32e6d9c0bad..57b822d4ef1 100644 |
| 32 | +--- a/eng/SourceBuild.props |
| 33 | ++++ b/eng/SourceBuild.props |
| 34 | +@@ -51,6 +51,7 @@ |
| 35 | + <InnerBuildArgs>$(InnerBuildArgs) /p:DisableSourceLink=false</InnerBuildArgs> |
| 36 | + <InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs> |
| 37 | + <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs> |
| 38 | ++ <InnerBuildArgs Condition="'$(UseNonPortableIlasmPackageOverride)' == 'true'">$(InnerBuildArgs) /p:UseNonPortableIlasmPackageOverride=true</InnerBuildArgs> |
| 39 | + </PropertyGroup> |
| 40 | + </Target> |
| 41 | + |
0 commit comments