-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Milestone
Description
aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
Lines 101 to 110 in a0b950f
<!-- | |
Determine the crossgen2 package path property name. Special case linux-musl-arm and linux-musl-arm64 because they | |
are built on an Ubuntu container with cross compilation tools. linux-musl-x64 is built in an alpine container. | |
Special case the crossgen2 package reference on Windows to avoid the x86 package when building in Visual Studio. | |
--> | |
<BuildOsName>$(TargetOsName)</BuildOsName> | |
<BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)'!='x64'">linux</BuildOsName> | |
<Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture> | |
<Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture> | |
<Crossgen2PackageRootVariableName>PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName)-$(Crossgen2BuildArchitecture)</Crossgen2PackageRootVariableName> |
This hardcodes some assumptions that are valid in the CI legs, but may not be in other systems.
For example, if this project is being built on Linux arm64 hardware using an OS that uses musl - in other words, linux-musl-arm64
, it will try and use the linux-arm64
crossgen2 instead.
Another example, if this code is being built on Windows on arm64 (or really, any architecture that's not x64), it will use the wrong crossgen, win-x64
, which will most likely fail to run on an Arm 64 machine.
See also this comment posted by @dougbu in #37374 (comment)
Metadata
Metadata
Assignees
Labels
area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework