Rollup merge of #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.
This commit is contained in:
Jubilee 2024-04-02 23:44:29 -07:00 committed by GitHub
commit 04a7a559fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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") {