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

feat(cargo): strip release binaries #3327

Closed
wants to merge 1 commit into from

Conversation

kskarthik
Copy link

@kskarthik kskarthik commented Aug 4, 2022

@the-mikedavis
Copy link
Member

Looks like strip was added in cargo 1.59? https://github.com/rust-lang/cargo/blob/7259757dc618479363aca6176ee5e76fd534e68c/CHANGELOG.md#cargo-159-2022-02-24

We target an older rust version to make packaging easier for some distributions, currently 1.57. We could probably switch to this once we move the MSRV up to 1.59+ but we do already strip release binaries for macOS and linux in the CI:

- name: Strip release binary (linux and macos)
if: matrix.build == 'x86_64-linux' || endsWith(matrix.build, 'macos')
run: strip "target/${{ matrix.target }}/release/hx"

@kchibisov
Copy link

I don't think that it makes sense to do so. Distro packages do run strip anyway and if you want to run strip for yourself you're free to do so as-well. So this change doesn't provide any benefit, since if you build it yourself in release mode you're interested in providing a backtrace so something can be done about it.

Disabling stripping that way would be annoying for package managers like portage to deal with, since it has an option to control stripping behavior and if the application force strip you're out of luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants