]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_ssa/src/back/linker.rs
Auto merge of #2650 - RalfJung:rustup, r=RalfJung
[rust.git] / compiler / rustc_codegen_ssa / src / back / linker.rs
index bad22ccb1fedd7dcb105e41acc12c750c73b12e4..c49b19bdf0094b9b39663c59b35d96007a7e2d6b 100644 (file)
@@ -610,7 +610,13 @@ fn debuginfo(&mut self, strip: Strip, _: &[PathBuf]) {
         match strip {
             Strip::None => {}
             Strip::Debuginfo => {
-                self.linker_arg("--strip-debug");
+                // The illumos linker does not support --strip-debug although
+                // it does support --strip-all as a compatibility alias for -s.
+                // The --strip-debug case is handled by running an external
+                // `strip` utility as a separate step after linking.
+                if self.sess.target.os != "illumos" {
+                    self.linker_arg("--strip-debug");
+                }
             }
             Strip::Symbols => {
                 self.linker_arg("--strip-all");