Repository navigation
Restore dotnet-aot to same-arch Linux SDK builds - #7987
Merged
Merged
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: b5a10383-b914-4ad8-858c-694b7f104f51
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the SDK layout gate that determines whether dotnet-aot (and therefore libdotnet-aot.so) should be published for same-OS builds, ensuring same-architecture Linux SDK layout builds remain “native” even when CrossBuild=true due to using a same-arch rootfs.
Changes:
- Updates the “native build” condition to be based on same OS + same architecture (and not on
CrossBuild=false), allowing same-arch rootfs builds to publishdotnet-aot. - Keeps existing exclusions/guards (notably
linux-muslexclusion and Linux cross-arch requiringCrossBuild=true) intact.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mthalman
approved these changes
Jul 27, 2026
Member
Author
|
/backport to release/11.0.1xx-preview7 |
Contributor
|
Started backporting to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CrossBuild=trueNativeAotSupportedsafeguardsLinux_x64build, which uses a same-architecture rootfs, to include and publishlibdotnet-aot.soFixes #7981
Root cause
The
Linux_x64VMR job targets Linux x64 from a Linux x64 host, but its same-architecture rootfs causesCrossBuild=trueto flow into SDK layout.The layout gate classified a build as native only when the architectures matched and
CrossBuildwas not true. It classified a build as cross only when the architectures differed. The VMR job therefore matched neither branch, leaving_ShouldPublishDotnetAot=false.TargetArchitecture == BuildArchitectureis the native-versus-cross-architecture signal.CrossBuildcan independently indicate that a rootfs/toolchain is in use, including for the same architecture.MSBuild evaluation proof
Evaluated
src/sdk/src/Layout/redist/redist.csprojwithdotnet msbuild, querying:The exact regression configuration now produces:
The surrounding decision matrix produced:
CrossBuild=falsetruetrueCrossBuild=truetruetrueCrossBuild=truetruetrueCrossBuild=falsefalsefalsefalseNativeAotSupported=falsetruefalsetruefalsetruefalseAlso queried the evaluated
ProjectReferenceitems. For the VMR regression configuration:For Linux x64 → arm64 without
CrossBuild=true:This confirms the corrected shared gate both enables
PublishDotnetAotand includesdotnet-aot.csprojin the restore/build graph for the affected VMR configuration, while preserving the Linux cross-architecture toolchain guard.