]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #82037 - calavera:strip_debuginfo_osx, r=petrochenkov
authorYuki Okushi <jtitor@2k36.org>
Thu, 10 Jun 2021 02:02:01 +0000 (11:02 +0900)
committerGitHub <noreply@github.com>
Thu, 10 Jun 2021 02:02:01 +0000 (11:02 +0900)
commit27e84b89dae055fef9fd9e705be65c244b54e4c7
treec74541d74bba8818cd6becae5f9d7f81ffcd2af4
parenteab201df7028ebb6812c0b1a01702ac6ecfcceed
parentdf0fc6daeede7722d631bcb45ed3755eb693580e
Rollup merge of #82037 - calavera:strip_debuginfo_osx, r=petrochenkov

Make symbols stripping work on MacOS X

As reported in the [stabilization issue](https://github.com/rust-lang/rust/issues/72110), MacOS' linker doesn't support the `-s` and `-S` flags to strip symbols anymore. However, the os ships a separated tool to perform these operations.

This change allows the compiler to use that tool after a target has been compiled to strip symbols.

For rationale, see: https://github.com/rust-lang/rust/issues/72110#issuecomment-641169818
For option selection, see: https://www.unix.com/man-page/osx/1/strip/

Signed-off-by: David Calavera <david.calavera@gmail.com>
compiler/rustc_codegen_ssa/src/back/link.rs
compiler/rustc_codegen_ssa/src/back/linker.rs