Skip to content

Commit

Permalink
Link to oldnames by default when using clang (#139)
Browse files Browse the repository at this point in the history
Closes #138
  • Loading branch information
messense authored Dec 23, 2024
1 parent e3b43d5 commit fcc0f78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ impl Clang {
);

let mut rustflags = get_rustflags(&workdir, target)?.unwrap_or_default();
rustflags
.flags
.extend(["-C".to_string(), "linker-flavor=lld-link".to_string()]);
rustflags.flags.extend([
"-C".to_string(),
"linker-flavor=lld-link".to_string(),
"-C".to_string(),
"link-arg=-defaultlib:oldnames".to_string(),
]);
rustflags.push(format!(
"-Lnative={dir}/lib/{target_unknown_vendor}",
dir = sysroot_dir,
Expand Down

0 comments on commit fcc0f78

Please sign in to comment.