From d2497820d02ddec3b57cd9cb60e698bf472d2808 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Wed, 7 Jan 2026 12:06:37 +0100 Subject: [PATCH] build-manifest: Add `rust-mingw` also as extension for "pc-windows-gnu" hosts. This should enable `rustup component add --target aarch64-pc-windows-gnullvm rust-mingw` when running an `x86_64-pc-windows-gnullvm` toolchain (and vice-versa). Which itself enables proper cross-compiling of Windows ARM64 binaries on a Windows x64 host without using commercial MSVC. --- src/tools/build-manifest/src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 42db12e5e117..4cec1b1f164b 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -282,6 +282,14 @@ fn target_host_combination(&mut self, host: &str, manifest: &Manifest) -> Option PkgType::RustMingw => { if host.contains("pc-windows-gnu") { components.push(host_component(pkg)); + extensions.extend( + TARGETS + .iter() + .filter(|&&target| { + target.contains("pc-windows-gnu") && target != host + }) + .map(|target| Component::from_pkg(pkg, target)), + ); } } // Tools are always present in the manifest,