lld status
kinke
noone at nowhere.com
Thu Dec 21 19:23:19 UTC 2017
On Thursday, 21 December 2017 at 18:40:54 UTC, Andrei
Alexandrescu wrote:
> I heard ldc already uses its embedded variant for linking
> programs (on Widows? Posix? 32bit? 64bit?).
Currently only for Windows-MSVC targets (both 32 and 64 bits) and
only when specifying the `-link-internally` switch. The host
platform doesn't matter, i.e., it works for cross-linking from
any Posix system too, even on ARM etc.
['Embedded variant' => we're linking in the static LLD libs and
so share the common LLVM code in a single executable.]
> Can we distribute it as an alternative to optlink?
Now that it's capable of outputting debuginfo .pdb's too (since
v5.0, at least on Windows hosts), it should basically be fine.
There's one catch though, and that's the rather big size of the
executable (26 MB for the v5.0.1 32-bit executable when linked
against the static MS runtime with VS 2017, with enabled LLVM
backends for x86[_64], ARM, AArch64 and Nvidia PTX).
That's due to LLD being a cross-linker by default, capable of
outputting Windows, ELF and Mach-O binaries, and because of
included codegen capabilities (for Link-Time Optimization), i.e.,
stuff that DMD doesn't need. Unfortunately, those features cannot
be simply opted-out via CMake.
More information about the Digitalmars-d
mailing list