Skip to content

Commit f655a4a

Browse files
authored
Use the live crossgen2 corresponding to the runtime we're building against (#59551)
1 parent 8709f36 commit f655a4a

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

eng/targets/Sfx.Common.targets

+9
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,13 @@
3636
<PublishReadyToRunPgoFiles Include="%(MIBCPackage.PackagePath)/**/*.mibc" />
3737
</ItemGroup>
3838
</Target>
39+
40+
<!-- We need to reference the live RID graph to get a graph with any additionally supported RIDs for this build. -->
41+
<ItemGroup>
42+
<PackageDownload Include="Microsoft.NETCore.Platforms" Version="[$(MicrosoftNETCorePlatformsVersion)]" />
43+
</ItemGroup>
44+
45+
<PropertyGroup Condition="Exists('$(NuGetPackageRoot)microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsVersion)')">
46+
<RuntimeIdentifierGraphPath>$(NuGetPackageRoot)microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsVersion)/PortableRuntimeIdentifierGraph.json</RuntimeIdentifierGraphPath>
47+
</PropertyGroup>
3948
</Project>

eng/tools/GenerateFiles/Directory.Build.targets.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<DefaultRuntimeFrameworkVersion Condition=" '$(IsServicingBuild)' != 'true' AND
8181
'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' AND
8282
'$(TargetLatestDotNetRuntime)' != 'false' ">${MicrosoftNETCoreAppRuntimeVersion}</DefaultRuntimeFrameworkVersion>
83-
<RuntimePackRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
83+
<RuntimePackRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">%(RuntimePackRuntimeIdentifiers);$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
8484
</KnownFrameworkReference>
8585

8686
<KnownAppHostPack Update="Microsoft.NETCore.App">
@@ -108,7 +108,7 @@
108108
<KnownCrossgen2Pack Update="Microsoft.NETCore.App.Crossgen2">
109109
<Crossgen2PackVersion
110110
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRuntimeVersion}</Crossgen2PackVersion>
111-
<Crossgen2RuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</Crossgen2RuntimeIdentifiers>
111+
<Crossgen2RuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">%(Crossgen2RuntimeIdentifiers);$(NETCoreSdkRuntimeIdentifier);$(TargetRuntimeIdentifier)</Crossgen2RuntimeIdentifiers>
112112
</KnownCrossgen2Pack>
113113

114114
<KnownILLinkPack Update="Microsoft.NET.ILLink.Tasks" Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.Composite.sfxproj

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
<RollForward>LatestPatch</RollForward>
1616
<!-- Precompile the shared framework with ReadyToRun. ReadyToRun is not currently supported on s390x or ppc64le or armv6 or loongarch64. -->
1717
<PublishReadyToRun Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le' OR '$(TargetArchitecture)' == 'loongarch64' ">false</PublishReadyToRun>
18-
<!-- VMR doesn't produce valid crossgen for the host/build machine https://github.com/dotnet/source-build/issues/3793 -->
19-
<PublishReadyToRun Condition=" '$(DotNetBuild)' == 'true' AND '$(Crossbuild)' == 'true' ">false</PublishReadyToRun>
2018
<PublishReadyToRun Condition=" '$(PublishReadyToRun)' == '' AND '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
2119
<!-- Don't use ReadyToRun when explicitly opted out -->
2220
<PublishReadyToRun Condition="'$(CrossgenOutput)' == 'false'">false</PublishReadyToRun>

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
1515
<RollForward>LatestPatch</RollForward>
1616
<!-- Precompile the shared framework with ReadyToRun. ReadyToRun is not currently supported on s390x or ppc64le or armv6. -->
17-
<PublishReadyToRun Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le' ">false</PublishReadyToRun>
18-
<!-- VMR doesn't produce valid crossgen for the host/build machine https://github.com/dotnet/source-build/issues/3793 -->
19-
<PublishReadyToRun Condition=" '$(DotNetBuild)' == 'true' AND '$(Crossbuild)' == 'true' ">false</PublishReadyToRun>
17+
<PublishReadyToRun Condition=" '$(TargetArchitecture)' == 's390x' OR '$(TargetArchitecture)' == 'armv6' OR '$(TargetArchitecture)' == 'ppc64le'">false</PublishReadyToRun>
2018
<PublishReadyToRun Condition=" '$(PublishReadyToRun)' == '' AND '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
2119
<!-- Don't use ReadyToRun when explicitly opted out -->
2220
<PublishReadyToRun Condition="'$(CrossgenOutput)' == 'false'">false</PublishReadyToRun>

0 commit comments

Comments
 (0)