why does DMD compile "hello world" to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 31 23:11:03 PDT 2014


On 01/09/14 01:51, Abe wrote:

> The question: why is Hello World so frickin` huge?!?

The runtime and standard library is statically linked, compared to C 
where it's dynamically linked. Also unnecessary symbols are not 
stripped. DMD on OS X doesn't currently support dynamic libraries. LDC 
has the --gc-sections flag, enabled by default. This will significantly 
reduce the since of the binary.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list