File size of exe: DMD vs LDC
David Nadlinger via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 9 11:48:38 PDT 2016
On Monday, 9 May 2016 at 13:53:45 UTC, Dicebot wrote:
> On Monday, 9 May 2016 at 13:48:50 UTC, Walter Bright wrote:
>> On 5/9/2016 5:24 AM, Jacob Carlborg wrote:
>>> LDC can strip sections which DMD cannot.
>>
>> Why not?
>
> AFAIR, because of how ModuleInfo/TypeInfo is emitted which
> makes linker never collect sections because they are referenced
> at least from there. LDC was intentionally modified to change
> code gen in that regard to make --gc-sections work - David will
> surely tell more :)
It's something along those lines. What is certainly true is that
I spent quite some time trying to work around "interesting"
linker behaviour to make this work. You can find more details on
my solution at https://issues.dlang.org/show_bug.cgi?id=879.
I haven't looked at DMD's related codegen in a while, so I don't
know what exactly remains to be done there.
— David
More information about the Digitalmars-d
mailing list