Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustc stripping broken on 1.83.0 #132

Closed
deciduously opened this issue Dec 27, 2024 · 2 comments
Closed

Rustc stripping broken on 1.83.0 #132

deciduously opened this issue Dec 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@deciduously
Copy link
Member

Compiling rust programs is failing unless strip = false due to a hardcoded dependency on /usr/bin/strip

@deciduously deciduously added the bug Something isn't working label Dec 27, 2024
@deciduously deciduously self-assigned this Dec 27, 2024
@deciduously
Copy link
Member Author

Here's the problematic line in rustc: https://github.com/rust-lang/rust/blob/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/compiler/rustc_codegen_ssa/src/back/link.rs#L1092

    if sess.target.is_like_osx {
        // Use system `strip` when running on host macOS.
        // <https://github.com/rust-lang/rust/pull/130781>
        let stripcmd = if cfg!(target_os = "macos") { "/usr/bin/strip" } else { "strip" };

If the host and target are both macOS, on 1.83.0 this path is hardcoded.

@deciduously
Copy link
Member Author

This is fixed as of 1.84.0: rust-lang/rust#131405

The rust toolchain will ship rust-objcopy from LLVM and use that for stripping. This has already been merged to master and is slated for the 1.84 milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant