For the adventurous: News from the LDC/Linux front

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 8 23:44:10 PDT 2014


On 08/07/14 19:54, David Nadlinger wrote:
> Hi all,
>
> I am excited to share news about two changes that recently made their
> way into the development version of LDC, changes that might be
> interesting for many of you Linux users out there.
>
> The first is that LDC now supports linker-level dead code elimination on
> Linux. If you happen to be familiar with the
> -f{function,data}-sections/--gc-sections options of the GNU toolchain,
> their equivalent is now enabled by default. For a set of small-ish
> programs that make use of different parts of Phobos, I've seen
> executable size improvements of close to 4x (!) in my tests. However, as
> --gc-sections is known to occasionally cause trouble with third-party
> code that relies on specific linker behavior, this optimization can be
> disabled with a new LDC switch, -disable-linker-strip-dead.

Is this only for Linux or Posix in general?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list