We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e528d5d commit 7caf6aaCopy full SHA for 7caf6aa
compiler/rustc_llvm/build.rs
@@ -220,7 +220,10 @@ fn main() {
220
let mut cmd = Command::new(&llvm_config);
221
cmd.arg(llvm_link_arg).arg("--libs");
222
223
- if !is_crossed {
+ // Don't link system libs if cross-compiling unless on Windows.
224
+ // On Windows system DLLs aren't linked directly, instead import libraries are used.
225
+ // These import libraries are independent of the host.
226
+ if !is_crossed || target.contains("windows") {
227
cmd.arg("--system-libs");
228
}
229
0 commit comments