Skip to content

Commit 917d2eb

Browse files
author
Curtis D'Alves
committed
add verbatim linker to AIXLinker
1 parent 3b022d8 commit 917d2eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: compiler/rustc_codegen_ssa/src/back/linker.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1643,9 +1643,9 @@ impl<'a> Linker for AixLinker<'a> {
16431643
}
16441644
}
16451645

1646-
fn link_dylib_by_name(&mut self, name: &str, _verbatim: bool, _as_needed: bool) {
1646+
fn link_dylib_by_name(&mut self, name: &str, verbatim: bool, _as_needed: bool) {
16471647
self.hint_dynamic();
1648-
self.link_or_cc_arg(format!("-l{name}"));
1648+
self.link_or_cc_arg(if verbatim { String::from(name) } else { format!("-l{name}") });
16491649
}
16501650

16511651
fn link_dylib_by_path(&mut self, path: &Path, _as_needed: bool) {
@@ -1656,7 +1656,7 @@ impl<'a> Linker for AixLinker<'a> {
16561656
fn link_staticlib_by_name(&mut self, name: &str, verbatim: bool, whole_archive: bool) {
16571657
self.hint_static();
16581658
if !whole_archive {
1659-
self.link_or_cc_arg(format!("-l{name}"));
1659+
self.link_or_cc_arg(if verbatim { String::from(name) } else { format!("-l{name}") });
16601660
} else {
16611661
let mut arg = OsString::from("-bkeepfile:");
16621662
arg.push(find_native_static_library(name, verbatim, self.sess));

0 commit comments

Comments
 (0)