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

send patch to LLVM to make it emit globals which are undefined into .bss #1988

Closed
andrewrk opened this issue Feb 19, 2019 · 2 comments
Closed
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. upstream An issue with a third party project that Zig uses.
Milestone

Comments

@andrewrk
Copy link
Member

Right now, in release builds, when you initialize a global variable to undefined, it actually bloats the binary size. Instead, LLVM should be taught that it can lower a global which has an undefined value to .bss section, to save binary size.

@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. upstream An issue with a third party project that Zig uses. labels Feb 19, 2019
@andrewrk andrewrk added this to the 0.5.0 milestone Feb 19, 2019
@LemonBoy
Copy link
Contributor

I believe this can be closed, the llvm patch that introduced this behavior was merged ~1year ago.

@andrewrk
Copy link
Member Author

Brilliant! Thank you Rust community!

@andrewrk andrewrk modified the milestones: 0.5.0, 0.4.0 Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

No branches or pull requests

2 participants