Skip to content

Fix internal CI NativeAOT cross-build for ARM/ARM64/musl legs - #67158

Merged
wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:fix-internal-aot-crossbuild
Jun 11, 2026
Merged

wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:fix-internal-aot-crossbuild

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Jun 11, 2026

Copy link
Copy Markdown
Member

The dotnet-dev-certs/dotnet-user-secrets/dotnet-user-jwts tools now publish NativeAOT for every bundled RID (added by VMR backflow #66933). The internal-only ARM, ARM64 and musl build legs lacked a native cross toolchain, so ILC's lld cross-link failed (missing --sysroot / no clang).

Run these 5 legs in the dotnet-buildtools azurelinux cross-prereq containers (clang + /crossrootfs/), set ROOTFS_DIR, and pass /p:CrossBuild=true so LocateNativeCompiler.targets sets SysRoot=$(ROOTFS_DIR) and ILC emits --sysroot/--target. Mirrors how the VMR builds these RIDs.

The dotnet-dev-certs/dotnet-user-secrets/dotnet-user-jwts tools now publish
NativeAOT for every bundled RID (added by VMR backflow dotnet#66933). The internal-only
ARM, ARM64 and musl build legs lacked a native cross toolchain, so ILC's lld
cross-link failed (missing --sysroot / no clang).

Run these 5 legs in the dotnet-buildtools azurelinux cross-prereq containers
(clang + /crossrootfs/<arch>), set ROOTFS_DIR, and pass /p:CrossBuild=true so
LocateNativeCompiler.targets sets SysRoot=$(ROOTFS_DIR) and ILC emits
--sysroot/--target. Mirrors how the VMR builds these RIDs.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings June 11, 2026 17:33
@wtgodbe
wtgodbe requested a review from a team as a code owner June 11, 2026 17:33
@github-actions github-actions Bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the internal CI build legs that cross-build Linux ARM/ARM64 and linux-musl (x64/arm/arm64) so they run in Azure Linux cross-compilation prereq containers that include clang and a prebuilt sysroot. This aligns internal CI behavior with VMR builds and fixes NativeAOT cross-link failures introduced by newly-added NativeAOT publishing for additional bundled RIDs.

Changes:

  • Add Azure Linux cross-compilation container resources for ARM/ARM64 and musl variants.
  • Switch the internal Linux ARM/ARM64 and linux-musl build legs to those containers and set ROOTFS_DIR.
  • Pass -p:CrossBuild=true so NativeAOT uses the sysroot/target appropriately during ILC linking.

@wtgodbe

wtgodbe commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Public CI doesn't execute this path - merging

@wtgodbe
wtgodbe merged commit a0b18f6 into dotnet:main Jun 11, 2026
13 of 27 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 17, 2026
wtgodbe added a commit that referenced this pull request Jun 17, 2026
#67252)

The dotnet-dev-certs/dotnet-user-secrets/dotnet-user-jwts tools now publish
NativeAOT for every bundled RID (added by VMR backflow #66933). The ARM, ARM64
and musl Build legs in ci-public.yml and ci-unofficial.yml lacked a native cross
toolchain, so ILC's lld cross-link failed (missing Scrt1.o / --sysroot / clang).

Run these 5 legs in the dotnet-buildtools azurelinux cross-prereq containers
(clang + /crossrootfs/<arch>), set ROOTFS_DIR, and pass /p:CrossBuild=true so
LocateNativeCompiler.targets sets SysRoot=$(ROOTFS_DIR) and ILC emits
--sysroot/--target. Mirrors the internal ci.yml fix from #67158.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants