summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_codegen_ssa/src/back/linker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back/linker.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/linker.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
index 11afe0fbc..09434513e 100644
--- a/compiler/rustc_codegen_ssa/src/back/linker.rs
+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -626,6 +626,15 @@ impl<'a> Linker for GccLinker<'a> {
self.linker_arg("--strip-all");
}
}
+ match self.sess.opts.unstable_opts.debuginfo_compression {
+ config::DebugInfoCompression::None => {}
+ config::DebugInfoCompression::Zlib => {
+ self.linker_arg("--compress-debug-sections=zlib");
+ }
+ config::DebugInfoCompression::Zstd => {
+ self.linker_arg("--compress-debug-sections=zstd");
+ }
+ }
}
fn no_crt_objects(&mut self) {