diff options
| author | Kai Luo <lkail@cn.ibm.com> | 2024-08-08 22:08:57 -0400 |
|---|---|---|
| committer | David Tenty <daltenty@ibm.com> | 2024-12-06 10:43:55 -0500 |
| commit | 18f8657415da5ebc480e63abe03f87d4b4ce4157 (patch) | |
| tree | 13fa969894c8c8d9fbb55bf63e3e336898c9cc8d /compiler/rustc_codegen_ssa/src | |
| parent | bc145cec4565a97a1b08df52d26ddf48ce3d7d0a (diff) | |
| download | rust-18f8657415da5ebc480e63abe03f87d4b4ce4157.tar.gz rust-18f8657415da5ebc480e63abe03f87d4b4ce4157.zip | |
Pass -bnoipath when adding rust upstream dynamic crates
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index ad81ff272c6..b3bb32bedf4 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2753,6 +2753,13 @@ fn add_upstream_rust_crates( .find(|(ty, _)| *ty == crate_type) .expect("failed to find crate type in dependency format list"); + if sess.target.is_like_aix { + // Unlike GNU's ld, AIX linker doesn't feature `-soname=...` when output + // a shared library. Instead, AIX linker offers `(no)ipath`. See + // https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command. + cmd.link_or_cc_arg("-bnoipath"); + } + for &cnum in &codegen_results.crate_info.used_crates { // We may not pass all crates through to the linker. Some crates may appear statically in // an existing dylib, meaning we'll pick up all the symbols from the dylib. |
