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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180326/d86e1601/attachment.html>
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 On 27 March 2018 at 00:40, Sumonto Ghosh via llvm-dev <llvm-dev at lists.llvm.org> wrote:> 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 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
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/executableNote 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