rustc uses wrong build tools when compiling from MSVC #133794
Labels
A-cross
Area: Cross compilation
C-bug
Category: This is a bug.
O-windows-msvc
Toolchain: MSVC, Operating system: Windows
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This is due to an issue in
cc-rs
, rust-lang/cc-rs#1308, which is a dependency inrustc_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 runningcargo 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.The text was updated successfully, but these errors were encountered: