Skip to content

Commit 04a7a55

Browse files
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.
2 parents f700fb2 + 00f7f57 commit 04a7a55

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_llvm/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ fn main() {
391391
}
392392
}
393393

394+
// libc++abi and libunwind have to be specified explicitly on AIX.
395+
if target.contains("aix") {
396+
println!("cargo:rustc-link-lib=c++abi");
397+
println!("cargo:rustc-link-lib=unwind");
398+
}
399+
394400
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
395401
// since nothing else requires it.
396402
if target.ends_with("windows-gnu") {

0 commit comments

Comments
 (0)