-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent Arm64 CrossDac builds running on Arm64. #88467
Conversation
Currently, when building the CLR on win-arm64, CrossDac builds for Linux with an (incorrect) host arch of x64 are attempted, failing the build. This patch prevents those builds running on systems with an identical host architecture to the cross target. TEST_LABEL: aarch64 TEST_IMG: ubuntu/dotnet-build TEST_CMD: safe ./projects/dotnet/build-runtime.sh Jira: ENTLLT-6600 Change-Id: I289e23c85376d238408799df0a573fb659e1522f
@kunalspathak and looks like @jkoritzinsky did a bunch of cross build changes in this area |
Tagging subscribers to this area: @hoyosjs Issue DetailsCurrently, when building the CLR on win-arm64, CrossDac builds for Linux with an (incorrect) host arch of x64 are attempted, failing the build. This patch prevents those builds running on systems with an identical host architecture to the cross target.
|
The previous patch was insufficient at preventing crossbuild of x64 onto x86, which also fails. This additional patch addresses that issue by explicitly checking for that scenario.
eng/Subsets.props
Outdated
@@ -276,7 +276,7 @@ | |||
<CrossDacHostArch Condition="'$(TargetArchitecture)' == 'arm'">x86</CrossDacHostArch> | |||
</PropertyGroup> | |||
|
|||
<ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'"> | |||
<ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(BuildArchitecture)' != '$(TargetArchitecture)' and ('$(BuildArchitecture)' != 'x64' or '$(TargetArchitecture)' != 'x86')"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't correct - x64 Windows will build the x64 linux crossdac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have had another go at this -- this time kept the check identical but excluded architectures other than x64 and x86. Since L274-277 seem to assume this is the case anyway, I've made the assumption this will be sufficient, but I'm unsure in exactly which scenarios this should be running.
Let me know if this isn't correct, and I'll try and correct again. Apologies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologize. I should have also been more descriptive. This won't break the official build. That being said - it's something that we should fix at some point - so that it's possible to use arm64 windows debuggers to analyze linux dumps.
Quick ping on this. Is this patch correct now? Little confused by the 7d running test, but I don't think it's this patch. It would be nice to have this patch as it would enable us to build on Windows on Arm in our local setup. |
Currently, when building the CLR on win-arm64, CrossDac builds for Linux with an (incorrect) host arch of x64 are attempted, failing the build. This patch prevents those builds running on systems with an identical host architecture to the cross target.