Mimimal runtime library
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Fri Apr 11 05:04:06 PDT 2008
Hans W. Uhlig wrote:
> Tomas Lindquist Olsen wrote:
>>
>> Just go with Tango and save yourself the hassle, it's much better
>> structured, and inter-module-dependencies have actually been given
>> some thought!
>
> Is there anyway to perform object stripping so only accessed functions
> and structures are built into the final binary's?
At the moment, not really with DMD.
GDC inherits -ffunction-sections and -fdata-sections from GCC, those
combined with -Wl,--gc-sections might work. I haven't tried this though,
and I'm not aware of anyone that has.
IIRC --gc-sections breaks DMD exception handling so that doesn't really
work there (--gc-sections will probably "work" with a custom linker
script, but AFAICT then any function with an exception table (and
anything it references) won't be stripped).
And of course, once LLVMDC (or another LLVM-based compiler) is complete
enough I'm pretty sure it should be able to do that.
More information about the Digitalmars-d
mailing list