Use shorthand linker strip arguments in order to support MacOS

This commit is contained in:
Alan Egerton 2020-06-08 17:24:21 +01:00
parent 7355816093
commit 8cf85bc0dc

View File

@ -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");
}
}
}