diff options
Diffstat (limited to 'src/librustc_codegen_utils/linker.rs')
| -rw-r--r-- | src/librustc_codegen_utils/linker.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/librustc_codegen_utils/linker.rs b/src/librustc_codegen_utils/linker.rs index 501166af906..8485ccd8f3d 100644 --- a/src/librustc_codegen_utils/linker.rs +++ b/src/librustc_codegen_utils/linker.rs @@ -343,17 +343,13 @@ impl<'a> Linker for GccLinker<'a> { } fn debuginfo(&mut self) { - match self.sess.opts.debuginfo { - DebugInfo::None => { - // If we are building without debuginfo enabled and we were called with - // `-Zstrip-debuginfo-if-disabled=yes`, tell the linker to strip any debuginfo - // found when linking to get rid of symbols from libstd. - match self.sess.opts.debugging_opts.strip_debuginfo_if_disabled { - Some(true) => { self.linker_arg("-S"); }, - _ => {}, - } - }, - _ => {}, + if let DebugInfo::None = self.sess.opts.debuginfo { + // If we are building without debuginfo enabled and we were called with + // `-Zstrip-debuginfo-if-disabled=yes`, tell the linker to strip any debuginfo + // found when linking to get rid of symbols from libstd. + if let Some(true) = self.sess.opts.debugging_opts.strip_debuginfo_if_disabled { + self.linker_arg("-S"); + } }; } |
