Skip to content

Commit 561364e

Browse files
Auto merge of rust-lang#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
2 parents 840245e + d249782 commit 561364e

File tree

1 file changed

+8
-0
lines changed
  • src/tools/build-manifest/src

1 file changed

+8
-0
lines changed

src/tools/build-manifest/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ impl Builder {
282282
PkgType::RustMingw => {
283283
if host.contains("pc-windows-gnu") {
284284
components.push(host_component(pkg));
285+
extensions.extend(
286+
TARGETS
287+
.iter()
288+
.filter(|&&target| {
289+
target.contains("pc-windows-gnu") && target != host
290+
})
291+
.map(|target| Component::from_pkg(pkg, target)),
292+
);
285293
}
286294
}
287295
// Tools are always present in the manifest,

0 commit comments

Comments
 (0)