Skip to content

Commit

Permalink
Allow passing -Wl,-u to the linker
Browse files Browse the repository at this point in the history
  • Loading branch information
amyspark committed Jan 16, 2024
1 parent e37f666 commit aafa1b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@ impl Library {
iter.next().map(|s| s.to_owned()),
);
}
"-u" => {
let meta = format!("rustc-link-arg=-Wl,-u,{}", val);
config.print_metadata(&meta);
}
_ => {}
}
}
Expand All @@ -931,6 +935,12 @@ impl Library {
self.include_paths.push(PathBuf::from(inc));
}
}
"-undefined" | "--undefined" => {
if let Some(symbol) = iter.next() {
let meta = format!("rustc-link-arg=-Wl,{},{}", part, symbol);
config.print_metadata(&meta);
}
}
_ => {
let path = std::path::Path::new(part);
if path.is_file() {
Expand Down

0 comments on commit aafa1b2

Please sign in to comment.