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

Use new Rustc/Cargo 1.58.0 strip feature in the pkg build #756

Open
ximon18 opened this issue Jan 10, 2022 · 2 comments
Open

Use new Rustc/Cargo 1.58.0 strip feature in the pkg build #756

ximon18 opened this issue Jan 10, 2022 · 2 comments

Comments

@ximon18
Copy link
Member

ximon18 commented Jan 10, 2022

Currently the pkg build manually invokes strip on built binaries. However the pkg build uses latest stable Rust and Rust 1.58.0 released two days from now will bring with it the new support for specifying binary stripping in the [profile.release] section of Cargo.toml. Using this will be less custom and hopefully will also be supported by cargo cross cross-compiled builds which otherwise require manually specifying the right strip tool to use.

@ximon18
Copy link
Member Author

ximon18 commented Jan 10, 2022

Update: In a quick local test using cross build the resulting binary was significantly smaller when built with cross +nightly build and the following addition to Cargo.toml (26233520 bytes for krill vs 34970356 bytes):

[profile.release]
panic = "abort"
+strip = "symbols"

@ximon18
Copy link
Member Author

ximon18 commented Jan 17, 2022

This will not actually be available via Cargo in 1.58.0, rather in the next release. See rust-lang/rust#72110 (comment).

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

No branches or pull requests

1 participant