Skip to content

Add aarch64-pc-windows-gnullvm target for Rust - #14488

Open
jeroen wants to merge 1 commit into
actions:mainfrom
jeroen:patch-1
Open

Add aarch64-pc-windows-gnullvm target for Rust#14488
jeroen wants to merge 1 commit into
actions:mainfrom
jeroen:patch-1

Conversation

@jeroen

@jeroen jeroen commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Open source ecosystems based on msys2 use clang-arm64 toolchains , which require the aarch64-pc-windows-gnullvm target in rust. We also need this for the R project.

This is basically the native target on arm64 for most oss projects, it is a bit surprising it is not installed.

Copilot AI review requested due to automatic review settings August 1, 2026 18:48

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 Windows Rust installation script to ensure the aarch64-pc-windows-gnullvm Rust target is available on ARM64 runner images, improving compatibility with ecosystems (e.g., msys2) that use clang-based ARM64 toolchains on Windows.

Changes:

  • Add rustup target add aarch64-pc-windows-gnullvm when building ARM64 Windows images.

@v-davit-ioramashvili

Copy link
Copy Markdown
Contributor

Thanks for getting to this first, @jeroen 👍 — this is exactly the right fix. I'd opened #14493 for the same target before I spotted yours, so I'm closing mine in favour of this one.

One thing worth adding while we're here: a small assertion in Rust.Tests.ps1 so we notice if the target ever silently drops out of a future image (nothing currently checks installed targets). It touches a file that isn't in your diff, so it can't go in as a one-click suggestion — but here's the snippet if you'd like to drop it in. Equally happy to send it as a small follow-up PR after this merges if you'd rather keep this one minimal.

In images/windows/scripts/tests/Rust.Tests.ps1, after the $rustEnvNotExists block:

$rustTargetNames = if (Test-IsArm64) {
    @("aarch64-pc-windows-msvc", "aarch64-pc-windows-gnullvm")
} else {
    @("i686-pc-windows-msvc", "x86_64-pc-windows-gnu")
}
$rustTargets = $rustTargetNames | ForEach-Object { @{ Target = $_ } }

and alongside the other It blocks:

It "<Target> rustup target is installed" -TestCases $rustTargets {
    (rustup target list --installed) | Should -Contain $Target
}

Either way — thanks again! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants