Huge output size for simple programs

Johannes Pfau via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 11 11:44:56 PDT 2015


Am Fri, 11 Sep 2015 05:36:27 -0700
schrieb Jonathan M Davis via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com>:

> Now, as to why the gdc binary is so large, I don't know. My guess is
> that it has something to do with the debug symbols. You could try
> building with -g or -gc to see how that affects the dmd-generated
> binary.

The libphobos shipped with the GDC binaries or with a self-compiled GDC
does contain debug information (default GCC policy IIRC?). That combined
with static linking leads to huge executables. A simple 'strip' command
reduces the executable size.


More information about the Digitalmars-d-learn mailing list