Skip to content

Rustc stripping broken on 1.83.0 #132

@deciduously

Description

@deciduously
Member

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

Activity

self-assigned this
on Dec 27, 2024
deciduously

deciduously commented on Jan 6, 2025

@deciduously
MemberAuthor

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

deciduously commented on Jan 6, 2025

@deciduously
MemberAuthor

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @deciduously

      Issue actions

        Rustc stripping broken on 1.83.0 · Issue #132 · tangramdotdev/packages