Skip to content

Commit

Permalink
Rollup merge of #99856 - csmoe:osx-no-dead-strip, r=bjorn3
Browse files Browse the repository at this point in the history
fix: remove fake no_dead_strip for osx

Closes #99788

Link arg `-no_dead_strip` doesn't exist on OSX at all.
The `no_gc_sections` function was never called before export-executable-symols implementation, and `export-executable-symbols` still works, so we just remove it.
r? `@bjorn3`
  • Loading branch information
Dylan-DPC authored Jul 28, 2022
2 parents 889497c + 03f9efe commit 55f041e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down

0 comments on commit 55f041e

Please sign in to comment.