Skip to content

Commit

Permalink
Use shorthand linker strip arguments in order to support MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
eggyal committed Jun 8, 2020
1 parent 7355816 commit 8cf85bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_codegen_ssa/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,12 @@ impl<'a> Linker for GccLinker<'a> {
match strip {
Strip::None => {}
Strip::Debuginfo => {
self.linker_arg("--strip-debug");
// MacOS linker does not support longhand argument --strip-debug
self.linker_arg("-S");
}
Strip::Symbols => {
self.linker_arg("--strip-all");
// MacOS linker does not support longhand argument --strip-all
self.linker_arg("-s");
}
}
}
Expand Down

0 comments on commit 8cf85bc

Please sign in to comment.