Skip to content

Commit 3bf80d6

Browse files
committed
Mirror clang's link stage on Windows.
Fixes problem discussed in #811.
1 parent daab924 commit 3bf80d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,10 @@ impl Build {
17631763
// depending on the origin clang can default to a mismatchig
17641764
// run-time.
17651765
cmd.push_cc_arg(format!("--target={}", target).into());
1766+
if target.contains("msvc") {
1767+
// Mirror what clang does at link stage
1768+
self.print(&format_args!("cargo:rustc-link-lib=oldnames"));
1769+
}
17661770
}
17671771

17681772
if cmd.family == ToolFamily::Clang && target.contains("android") {

0 commit comments

Comments
 (0)