-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-crossArea: Cross compilationArea: Cross compilationC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This is due to an issue in cc-rs
, rust-lang/cc-rs#1308, which is a dependency in rustc_llvm
/rustc_codegen_ssa
. There is a fix in progress (not yet released/merged): rust-lang/cc-rs#1310. This is a problem as of Rust 1.83.
The issue can be reproduced by creating a cargo workspace with an empty build.rs
, creating a new MSVC project within that workspace and running cargo build
from within the Pre-Build Event of that MSVC project. When targeting something other than the native arch, cargo/rustc will use the wrong build tools for linking or compilation.
I can provide more details/examples if necessary.
EDIT: This should be fixed on its own once cc
is updated.
hulthe and MarkusPettersson98
Metadata
Metadata
Assignees
Labels
A-crossArea: Cross compilationArea: Cross compilationC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.