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

Remove unnecessary symbols and sections from *_gnu import libs #1968

Merged
merged 1 commit into from Aug 22, 2022

Conversation

glandium
Copy link
Contributor

@glandium glandium commented Aug 17, 2022

This cuts their size by more than 20% by removing what is essentially
dead-weight:
crates/targets/i686_gnu/lib/libwindows.a | Bin 14009016 -> 10924886 bytes
crates/targets/x86_64_gnu/lib/libwindows.a | Bin 13879932 -> 10487912 bytes

Note this PR includes the commits from PR #1967 because github doesn't do PR dependencies.

@kennykerr
Copy link
Collaborator

This cuts their size by more than 20%

This sounds great! @riverar is this a no-brainer or should we discuss further with an issue?

As I mentioned elsewhere, I'd like to avoid unnecessary churn in the targets if raw-dylib is close to stabilization.

riverar
riverar previously approved these changes Aug 22, 2022
Copy link
Collaborator

@riverar riverar left a comment

Choose a reason for hiding this comment

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

Looks good; let's merge #1967 first.

@kennykerr
Copy link
Collaborator

Merged #1967 - this PR now has merge conflicts - once that's cleared we can get it in - thanks!

This cuts their size by more than 20% by removing what is essentially
dead-weight:
 crates/targets/i686_gnu/lib/libwindows.a   | Bin 14009016 -> 10924886 bytes
 crates/targets/x86_64_gnu/lib/libwindows.a | Bin 13879932 -> 10487912 bytes
@riverar riverar merged commit 26963c8 into microsoft:master Aug 22, 2022
@glandium glandium deleted the strip branch August 22, 2022 22:08
@kennykerr
Copy link
Collaborator

Still surprising how much bigger the gnu libs are compared with msvc. 😟

@mati865
Copy link
Contributor

mati865 commented Aug 23, 2022

This is just the legacy format of import libs. Short import libraries created by LLVM for gnullvm target are by far the smallest at around 3 MiB, while short import libraries produced by MSVC are around 4 MiB.

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.

None yet

4 participants