Force clang to use ld.lld

Hi
While cross compiling on Mac
Host: Mac
Target: Linux on ArmV7

How can I force clang to use the non-system linker
But use llvm-lld (i.e. ld.lld) or any other non standard linker

Thanks

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

Peter

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