strip = "symbols" doesn't work when cross-compiling from linux to macOS #114411
Labels
A-cross
Area: Cross compilation
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-macos
Operating system: macOS
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Currently, when compiling for macOS with
-C strip=symbols
, rustc will try to invokestrip
on the output binary to remove its symbols. This, unfortunately, fails when cross-compiling from linux, as thestrip
binary on linux only understands ELF files and will choke on the mach-o. This results in the following warnings in the build logs, and an unstripped binary output:Ideally, rustc should either:
llvm-strip
(which is currently packaged in rustup as part of llvm-tools-preview, CC Tracking Issue for llvm-tools-preview #85658)Reproduction steps:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: