Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0b55b50

Browse filesBrowse files
authored
Unrolled build for #141817
Rollup merge of #141817 - mati865:fix-system-libs-when-cross-compiling, r=cuviper rustc_llvm: add Windows system libs only when cross-compiling from Wi… …ndows This obviously doesn't work when cross-compiling from Linux. Split out from: #140772 Fixes the issue described at [#general > Problems while trying to cross compile rustc for windows](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Problems.20while.20trying.20to.20cross.20compile.20rustc.20for.20windows/with/520508561)
2 parents c68032f + 81f61ac commit 0b55b50
Copy full SHA for 0b55b50

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎compiler/rustc_llvm/build.rs

Copy file name to clipboardExpand all lines: compiler/rustc_llvm/build.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ fn main() {
228228
let mut cmd = Command::new(&llvm_config);
229229
cmd.arg(llvm_link_arg).arg("--libs");
230230

231-
// Don't link system libs if cross-compiling unless targeting Windows.
231+
// Don't link system libs if cross-compiling unless targeting Windows from Windows host.
232232
// On Windows system DLLs aren't linked directly, instead import libraries are used.
233233
// These import libraries are independent of the host.
234-
if !is_crossed || target.contains("windows") {
234+
if !is_crossed || target.contains("windows") && host.contains("windows") {
235235
cmd.arg("--system-libs");
236236
}
237237

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.