Skip to content

Commit 8cf85bc

Browse files
committed
Use shorthand linker strip arguments in order to support MacOS
1 parent 7355816 commit 8cf85bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc_codegen_ssa/back/linker.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,12 @@ impl<'a> Linker for GccLinker<'a> {
481481
match strip {
482482
Strip::None => {}
483483
Strip::Debuginfo => {
484-
self.linker_arg("--strip-debug");
484+
// MacOS linker does not support longhand argument --strip-debug
485+
self.linker_arg("-S");
485486
}
486487
Strip::Symbols => {
487-
self.linker_arg("--strip-all");
488+
// MacOS linker does not support longhand argument --strip-all
489+
self.linker_arg("-s");
488490
}
489491
}
490492
}

0 commit comments

Comments
 (0)