Skip to content

Commit 18f8657

Browse files
Kai Luodaltenty
Kai Luo
authored andcommitted
Pass -bnoipath when adding rust upstream dynamic crates
1 parent bc145ce commit 18f8657

File tree

1 file changed

+7
-0
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+7
-0
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2753,6 +2753,13 @@ fn add_upstream_rust_crates(
27532753
.find(|(ty, _)| *ty == crate_type)
27542754
.expect("failed to find crate type in dependency format list");
27552755

2756+
if sess.target.is_like_aix {
2757+
// Unlike GNU's ld, AIX linker doesn't feature `-soname=...` when output
2758+
// a shared library. Instead, AIX linker offers `(no)ipath`. See
2759+
// https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command.
2760+
cmd.link_or_cc_arg("-bnoipath");
2761+
}
2762+
27562763
for &cnum in &codegen_results.crate_info.used_crates {
27572764
// We may not pass all crates through to the linker. Some crates may appear statically in
27582765
// an existing dylib, meaning we'll pick up all the symbols from the dylib.

0 commit comments

Comments
 (0)