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

On macOS, make strip="symbols" not pass any options to strip #88137

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

joshtriplett
Copy link
Member

This makes the output with strip="symbols" match the result of just
calling strip on the output binary, minimizing the size of the binary.

This makes the output with `strip="symbols"` match the result of just
calling `strip` on the output binary, minimizing the size of the binary.
@joshtriplett joshtriplett added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 18, 2021
@rust-highfive
Copy link
Collaborator

r? @cjgillot

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2021
@joshtriplett joshtriplett marked this pull request as ready for review August 18, 2021 16:47
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 6, 2021
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an expert on macOS, but the changes look reasonable. CC @rust-lang/compiler
Marking as needing attention of the team next thursday.

@estebank estebank added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). I-nominated labels Sep 17, 2021
@joshtriplett
Copy link
Member Author

Anyone available to review and r+ this? I'd love to get this merged, to unblock support for strip in cargo.

@joshtriplett
Copy link
Member Author

r? @michaelwoerister

@michaelwoerister
Copy link
Member

During the compiler team triage meeting it was mentioned that we'd like @alexcrichton to take a look (because Alex knows about this kind of stuff on OSX). If there is no progress in a couple of days, I'll take a look.

@alexcrichton
Copy link
Member

Ah sorry I don't know much about strip on macOS or why the -x option was originally chosen here or what the default set of things strip removes on macOS, so I'm probably not the best to take a look at this.

@michaelwoerister
Copy link
Member

Thanks, @alexcrichton! I'll take a look then.

@joshtriplett, what is the motivation behind this change? Why exactly is it needed to unblock strip in cargo?

@joshtriplett
Copy link
Member Author

Stable support for strip in cargo needs stable support for strip in rustc, as well as reasonable support for common targets. Once we stabilize strip in rustc, it'll be much harder to change its behavior without risking compatibility issues. So I'd like to get this change in, then stabilize strip in rustc, then stabilize it in cargo.

@michaelwoerister
Copy link
Member

https://github.com/rust-lang/rust/pull/88137/files#r691191650 gives the explanation I was looking for.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 7, 2021

📌 Commit ff697c6 has been approved by michaelwoerister

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Oct 7, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 7, 2021
…ption, r=michaelwoerister

On macOS, make strip="symbols" not pass any options to strip

This makes the output with `strip="symbols"` match the result of just
calling `strip` on the output binary, minimizing the size of the binary.
Manishearth added a commit to Manishearth/rust that referenced this pull request Oct 8, 2021
…ption, r=michaelwoerister

On macOS, make strip="symbols" not pass any options to strip

This makes the output with `strip="symbols"` match the result of just
calling `strip` on the output binary, minimizing the size of the binary.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 8, 2021
…ingjubilee

Rollup of 8 pull requests

Successful merges:

 - rust-lang#87918 (Enable AutoFDO.)
 - rust-lang#88137 (On macOS, make strip="symbols" not pass any options to strip)
 - rust-lang#88772 (Fixed confusing wording on Result::map_or_else.)
 - rust-lang#89025 (Implement `#[link_ordinal(n)]`)
 - rust-lang#89082 (Implement rust-lang#85440 (Random test ordering))
 - rust-lang#89288 (Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor)
 - rust-lang#89476 (Correct decoding of foreign expansions during incr. comp.)
 - rust-lang#89622 (Use correct edition for panic in [debug_]assert!().)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cbb561f into rust-lang:master Oct 8, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 8, 2021
@joshtriplett joshtriplett deleted the osx-strip-symbols-no-option branch October 18, 2021 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.