From 3957d3a08a3687cc86d52ec0c539d65beb20f902 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Thu, 23 Mar 2023 15:14:27 +0800 Subject: [PATCH] Adjust debug info stripping --- compiler/rustc_codegen_ssa/src/back/linker.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 43252d5e373..dd117681950 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1605,8 +1605,9 @@ fn control_flow_guard(&mut self) {} fn debuginfo(&mut self, strip: Strip, _: &[PathBuf]) { match strip { Strip::None => {} - Strip::Debuginfo => {} - Strip::Symbols => { + // FIXME: -s strips the symbol table, line number information + // and relocation information. + Strip::Debuginfo | Strip::Symbols => { self.cmd.arg("-s"); } }