[cfe-dev] [llvm-dev] LLD to be the default linker in Clang

David Chisnall via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 28 11:52:05 PDT 2016


On 28 Oct 2016, at 18:38, Renato Golin via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> GCC uses bfd by default, LLVM uses LLD. If you want to change, use -fuse-ld.

GCC doesn’t use BFD by default, it uses /usr/bin/ld (or ${PREFIX}/bin/ld).  If that is a symlink to ld.bfd, ld.gold, Apple ld64, or ld.lld, it will use whichever.  I think it would be very confusing for clang to use a linker that is not whatever the host system has decided the default linker should be, unless there is some compelling reason to pick a different one (e.g. you’re doing LTO with a mechanism that absolutely requires lld and not ld64/gold).

David




More information about the cfe-dev mailing list