-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Windows binary includes lots of C header metadata #14144
Comments
Wow, this is pretty awful. This seems like a regressions, so it may be nice to pinpoint where it happened. |
Nominating, it's tough to explain we work well on windows with a wart like this. |
I really don't have any idea why Some more information: My build environment is a stock MinGW (not MinGW-w64) with GCC 4.8.1. |
nightly's
|
We're using the default jemalloc compilation options, which includes a high debug level ( |
@thestinger Aha, indeed. |
@lifthrasiir: we don't really need jemalloc debug symbols at all beyond the basics that are there without |
P-high, 1.0 milestone. |
By default, jemalloc is building itself with -g3 if the local compiler supports it. It looks like this is generating a good deal of debug info that windows isn't optimizing out (on the order of 18MB). Windows gcc/ld is also not optimizing this data away, causing hello world to be 18MB in size. There's no current real need for debugging jemalloc to a great extent, so this commit manually passes -g1 to override -g3 which jemalloc is using. This is confirmed to drop the size of executables on windows back to a more reasonable size (2.0MB, as they were before). Closes #14144
@lifthrasiir can you confirm that this is fixed now? |
@cmr The current Windows nightly ( |
@cmr Okay, I've confirmed that this is fixed as of |
Sweet, thanks! On Sat, May 17, 2014 at 7:43 AM, Kang Seonghoon notifications@github.comwrote:
|
…, r=Veykril fix: Search raw identifiers without prefix When we find references/usages of a raw identifier, we should disregard `r#` prefix because there are keywords one can use without the prefix in earlier editions (see rust-lang#13034; this bug is actually fallout from the PR). `name`, the text we're searching for, has already been stripped of the prefix, but the text of nodes we compare it to hasn't been. The second commit is strictly refactoring, I can remove it if it's not much of value.
Not sure how did they end up there, but even with the simple code like
fn main() {}
and aggressive compilation options like-Z lto --opt-level=3
the current master gives over 18 MB of binary, of which 16 MB consists of string constants seemingly derived from C headers (e.g."ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET __MSABI_LONG(8464)\x00\x01\xca\n"
, from mingw-w64winerror.h
).Last checked with rust nightly
0550b79 2014-05-12 00:31:52 -0700
.The text was updated successfully, but these errors were encountered: