Skip to content

Commit aafa1b2

Browse files
committed
Allow passing -Wl,-u to the linker
1 parent e37f666 commit aafa1b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,10 @@ impl Library {
905905
iter.next().map(|s| s.to_owned()),
906906
);
907907
}
908+
"-u" => {
909+
let meta = format!("rustc-link-arg=-Wl,-u,{}", val);
910+
config.print_metadata(&meta);
911+
}
908912
_ => {}
909913
}
910914
}
@@ -931,6 +935,12 @@ impl Library {
931935
self.include_paths.push(PathBuf::from(inc));
932936
}
933937
}
938+
"-undefined" | "--undefined" => {
939+
if let Some(symbol) = iter.next() {
940+
let meta = format!("rustc-link-arg=-Wl,{},{}", part, symbol);
941+
config.print_metadata(&meta);
942+
}
943+
}
934944
_ => {
935945
let path = std::path::Path::new(part);
936946
if path.is_file() {

0 commit comments

Comments
 (0)