Skip to content

Commit

Permalink
Mirror clang's link stage on Windows.
Browse files Browse the repository at this point in the history
Fixes problem discussed in #811.
  • Loading branch information
dot-asm committed Sep 20, 2023
1 parent daab924 commit 3bf80d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,10 @@ impl Build {
// depending on the origin clang can default to a mismatchig
// run-time.
cmd.push_cc_arg(format!("--target={}", target).into());
if target.contains("msvc") {
// Mirror what clang does at link stage
self.print(&format_args!("cargo:rustc-link-lib=oldnames"));
}
}

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

0 comments on commit 3bf80d6

Please sign in to comment.