Auto merge of #150758 - ColinFinck:rust-mingw-package-as-extensions, r=jieyouxu

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.

CC @mati865
This commit is contained in:
rust-bors[bot]
2026-01-12 05:35:38 +00:00
committed by GitHub
+8
View File
@@ -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,