summary refs log tree commit diff
path: root/compiler/rustc_llvm/build.rs
diff options
context:
space:
mode:
authorKai Luo <lkail@cn.ibm.com>2024-04-02 17:17:13 +0800
committerKai Luo <lkail@cn.ibm.com>2024-04-02 17:17:13 +0800
commit1f2d1420cb1c5c5cb52712955f8ed47dcfda8c67 (patch)
treedba1e1738838b3ac7f084c1c7243cbf1ebe4b72a /compiler/rustc_llvm/build.rs
parente2cf2cb30388385f0fe6b406a31a3f9841a72a62 (diff)
downloadrust-1f2d1420cb1c5c5cb52712955f8ed47dcfda8c67.tar.gz
rust-1f2d1420cb1c5c5cb52712955f8ed47dcfda8c67.zip
Fix linking c++ runtimes on AIX
Diffstat (limited to 'compiler/rustc_llvm/build.rs')
-rw-r--r--compiler/rustc_llvm/build.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index 4b0c1229da1..66fa4bde785 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -391,6 +391,11 @@ fn main() {
         }
     }
 
+    // libc++abi have to be specified explicitly on AIX.
+    if target.contains("aix") {
+        println!("cargo:rustc-link-lib=c++abi");
+    }
+
     // Libstdc++ depends on pthread which Rust doesn't link on MinGW
     // since nothing else requires it.
     if target.ends_with("windows-gnu") {