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

cdylib size regression on MinGW #45809

Closed
alexcrichton opened this issue Nov 6, 2017 · 5 comments
Closed

cdylib size regression on MinGW #45809

alexcrichton opened this issue Nov 6, 2017 · 5 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@alexcrichton
Copy link
Member

First reported here it looks like there was a regression in the range of e266888...c11f689 (nightly-2017-08-28-gnu and nightly-2017-08-30-gnu) to the size of a cdylib artifact in the project https://github.com/rkarp/rust-dll-demo/tree/879459c8612bfa178b660f480a56a738ca531bb1.

Locally I've reproduced this with:

$ cargo +nightly-2017-08-28-gnu build --release && ls -alh target/release/rust_dll_init.dll
-rwxr-xr-x 2 alex alex 268K Nov  6 09:26 target/release/rust_dll_init.dll
$ cargo +nightly-2017-08-30-gnu build --release && ls -alh target/release/rust_dll_init.dll
-rwxr-xr-x 2 alex alex 822K Nov  6 09:28 target/release/rust_dll_init.dll
@alexcrichton alexcrichton added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Nov 6, 2017
@alexcrichton
Copy link
Member Author

Also as reported if you run strip.exe over the resulting DLL they both shrink, but they both shrink to the same amount. The first nightly goes to 169K and the second goes to 173K.

@alexcrichton
Copy link
Member Author

Running just strip.exe -g (only stripping debug info) doesn't shrink it as much but shrinks them to the same size, looks like more debuginfo is coming out the back.

@alexcrichton
Copy link
Member Author

This may be related to #44107 where we're just shipping more debug info. @rkarp is this a problem for you? If so would you mind continuing the investigation?

@rkarp
Copy link
Contributor

rkarp commented Nov 6, 2017

Oh it's not a problem for me at all. But I think at some point in the future it might be a good thing for rustup / cargo to provide a way to get rid of all the bloat, for example by stripping the resulting executable when building with debug = false or maybe even by using a pre-built std without debug info.

@alexcrichton
Copy link
Member Author

Ok makes sense! In light of that I'm going to close this issue specifically for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

2 participants