whats happening to my binary file size?

Messenger via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 26 18:41:49 PDT 2014


On Tuesday, 26 August 2014 at 23:36:44 UTC, Israel wrote:
> I wasnt paying any attention to the file size of my binaries 
> when
> i started using D.
>
> My first program is simple and compiles at 486kb, which 
> honestly,
> is kind of absurd but anyways, after i start adding other 
> imports
> it ran all the way up to 4.5mb.
>
> what i want to ask is, what exactly is happening to my binary
> when all i do is import various modules?

Conjecture: your binary has its imports statically linked in, and 
your linker doesn't remove unused code (--gc-sections).

https://issues.dlang.org/show_bug.cgi?id=879


More information about the Digitalmars-d-learn mailing list