-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add option to strip binaries #8246
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Eh2406 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
As this is an unstable |
Thanks for this! I agree yeah that this'll need an unstable opt-in in Cargo as well, but otherwise this is looking good! Mind adding some nightly-only tests for this as well? |
I've gated |
8fa84d8
to
a10eb86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
I've addressed the latest review comments. |
@bors: r+ Thanks! |
📌 Commit 2cd41e1 has been approved by |
☀️ Test successful - checks-azure |
Update cargo 7 commits in 500b2bd01c958f5a33b6aa3f080bea015877b83c..9fcb8c1d20c17f51054f7aa4e08ff28d381fe096 2020-05-18 17:12:54 +0000 to 2020-05-25 16:25:36 +0000 - Bump to semver 0.10 for `VersionReq::is_exact` (rust-lang/cargo#8279) - Fix panic with `cargo tree --target=all -Zfeatures=all` (rust-lang/cargo#8269) - Fix nightly tests with llvm-tools. (rust-lang/cargo#8272) - Provide better error messages for a bad `patch`. (rust-lang/cargo#8248) - Try installing exact versions before updating (rust-lang/cargo#8022) - Document unstable `strip` profile feature (rust-lang/cargo#8262) - Add option to strip binaries (rust-lang/cargo#8246)
This is great @GabrielMajeri, can't wait for it to land in stable cargo. I just tried So this completely obviates the need to have |
|
Yep, it's fixed in |
How is this different from using the |
@yisibl If you're talking about GNU |
@GabrielMajeri Yes, I also use I find that using the |
Will this be stabilized? On rust tracking issue it says cargo should have it by next release since april, but now it's quite some time since then. rust-lang/rust#72110 (comment) |
The cargo |
Ah, I did see that toml thing. But I thought there is something like |
This PR adds a Cargo option for stripping symbols from generated binaries.
This is based on the
-Z strip
flag forrustc
, which has been recently implemented.Notes for reviewers: I'm not entirely sure how we test this, I've created a crate locally and it seems to be working.
Supersedes my previous work in #8191.
Fixes #3483.