about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlan Egerton <eggyal@gmail.com>2020-06-08 17:24:21 +0100
committerAlan Egerton <eggyal@gmail.com>2020-06-08 17:51:34 +0100
commit8cf85bc0dcabcf99775f2b9a7fa2191caea7f164 (patch)
tree7c8b6e472fafde59bee906ca2bc4b60f405c87d6 /src
parent73558160933b2764ed9a84b1b2b647e128eac3f8 (diff)
downloadrust-8cf85bc0dcabcf99775f2b9a7fa2191caea7f164.tar.gz
rust-8cf85bc0dcabcf99775f2b9a7fa2191caea7f164.zip
Use shorthand linker strip arguments in order to support MacOS
Diffstat (limited to 'src')
-rw-r--r--src/librustc_codegen_ssa/back/linker.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index d9fed998c92..b17c3678207 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -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");
             }
         }
     }