[llvm-dev] Force clang to use ld.lld

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 27 02:00:22 PDT 2018


On 27 Mar 2018, at 09:58, Peter Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> The option -fuse-ld is the closest option that I can think of. In its
> most common form it accepts bfd, gold or lld, clang will then invoke
> ld.bfd, ld.gold or ld.lld respectively. On many systems ld is a
> symlink to an executable of the form ld.suffix. Alternatively the full
> path to the linker can be given
> -fuse-ld=/full/path/to/linker/executable

Note that if you don’t specify a path, clang will look for {tools search path}/lld.{argument}, so you can use -fuse-ld=lld60 if you have LLD 6.0 installed as ld.lld60, for example.

David



More information about the llvm-dev mailing list