For the adventurous: News from the LDC/Linux front
David Nadlinger via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 10 06:51:13 PDT 2014
On Wednesday, 9 July 2014 at 06:44:10 UTC, Jacob Carlborg wrote:
> On 08/07/14 19:54, David Nadlinger wrote:
>> The first is that LDC now supports linker-level dead code
>> elimination on
>> Linux. […]
>
> Is this only for Linux or Posix in general?
So far it is only enabled on Linux, as I made the necessary
adjustments to the druntime module registration code and so on
while working on shared library support there.
That being said, supporting this should be considerably easier
for platforms that still use the "old" __Dmodule_ref module
registration mechanism, as the latter doesn't depend on
unreferenced symbols in a magic section being kept by the linker.
I can't think of any issues that would preclude using e.g. the
equivalent linker option on OS X (-dead_strip) right now, or
---gc-sections on FreeBSD.
But as with all improvements, this simply depends on somebody to
sit down and make it happen. Getting the thing to work shouldn't
be too hard, and I'd be happy to help anyone attempting this if
any tough issues crop up, but if you are just waiting for me to
find the time to investigate other platforms, you'll probably be
in for quite a wait.
Cheers,
David
More information about the Digitalmars-d
mailing list