Skip to content

Commit

Permalink
Unrolled build for rust-lang#123359
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#123359 - bzEq:aix-libc++abi, r=cuviper

Link against libc++abi and libunwind as well when building LLVM wrappers on AIX

Unlike `libc++.so` on Linux which is a linker script
```ld
INPUT(libc++.so.1 -lc++abi -lunwind)
```
AIX linker doesn't support such script, so `c++abi` and `unwind` have to be specified explicitly.
  • Loading branch information
rust-timer authored Apr 3, 2024
2 parents 76cf07d + 00f7f57 commit 71a4159
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ fn main() {
}
}

// libc++abi and libunwind have to be specified explicitly on AIX.
if target.contains("aix") {
println!("cargo:rustc-link-lib=c++abi");
println!("cargo:rustc-link-lib=unwind");
}

// Libstdc++ depends on pthread which Rust doesn't link on MinGW
// since nothing else requires it.
if target.ends_with("windows-gnu") {
Expand Down

0 comments on commit 71a4159

Please sign in to comment.