diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2024-04-02 23:44:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-02 23:44:29 -0700 |
| commit | 04a7a559fc85ca4a2fb5f94980aea2e4c3600309 (patch) | |
| tree | 2bf67d93c02560b71079cd3b7e8581a7070cff9e | |
| parent | f700fb24f39f4b027b03b5b1e4e6723d24f701b8 (diff) | |
| parent | 00f7f57159aac2e1df49db2eb87353338bef2bb0 (diff) | |
| download | rust-04a7a559fc85ca4a2fb5f94980aea2e4c3600309.tar.gz rust-04a7a559fc85ca4a2fb5f94980aea2e4c3600309.zip | |
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.
| -rw-r--r-- | compiler/rustc_llvm/build.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index 4b0c1229da1..e2c0ec90c7c 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -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") { |
