From 03f9efedb15ac5d4a697390a4bed00df23ee92d2 Mon Sep 17 00:00:00 2001 From: csmoe Date: Thu, 28 Jul 2022 22:22:13 +0800 Subject: [PATCH] fix: remove fake no_dead_strip for osx --- compiler/rustc_codegen_ssa/src/back/linker.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 8e5ac9da4ac50..a4bbdefbb87f8 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -566,9 +566,7 @@ impl<'a> Linker for GccLinker<'a> { } fn no_gc_sections(&mut self) { - if self.sess.target.is_like_osx { - self.linker_arg("-no_dead_strip"); - } else if self.sess.target.linker_is_gnu || self.sess.target.is_like_wasm { + if self.sess.target.linker_is_gnu || self.sess.target.is_like_wasm { self.linker_arg("--no-gc-sections"); } }