whats happening to my binary file size?

Israel via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 27 09:24:22 PDT 2014


On Wednesday, 27 August 2014 at 09:23:57 UTC, Marc Schütz wrote:
> On Wednesday, 27 August 2014 at 02:16:37 UTC, Israel wrote:
>> On Wednesday, 27 August 2014 at 01:41:51 UTC, Messenger wrote:
>>> 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
>>
>> I see, thanks man. From what i understand is that this is a
>> "unintended" "feature" rather than a direct bug in order to 
>> make
>> my life easier?
>>
>> I know that object files are stored in .a libraries but all 
>> this
>> seems too advanced for me to understand...
>
> You could try using LDC. The latest version 0.14.0 already uses 
> --gc-sections automatically. (But it is based on DMD 2.065, so 
> you cannot (yet) use all of the newest features like @nogc that 
> are in DMD 2.066.)

Yea i saw that thread in the LDC section and thats actually
pretty cool that he produced an 88kb file.

Im not too worried about the GC since ive been working with it my
entire time from beginner till now.

But, how would i configure dub and my dub.json to automatically
use those LDC switches if it isnt automatically built into dub?


More information about the Digitalmars-d-learn mailing list