<div dir="ltr"><div><div>Hi,<br><br></div>Is it OK to commit this?  Thanks.<br><br></div>Logan<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 4:01 PM, David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 25 Jun 2014, at 19:20, Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br>

<br>
>> It's a bit binutils-centric isn't it? Can't we make it accept a<br>
>> basename instead, so that any new or otherwise odd (ld.gold-2.25? lld?<br>
>> mclinker?) linker can be used instead without modifying Clang.<br>
><br>
> *Sigh*. Apologies. I've just noticed this comes from GCC land, so<br>
> we've probably got to follow for compatibility. After all, why would<br>
> anyone want to use anything except the system-default ld.gold or<br>
> ld.bfd, they're perfect!<br>
<br>
</div></div>The gcc version hard-codes gold and bfd as the two valid options.  My patch, which Logan has cleaned up and fixed, allows --fuse-ld= to take a string and then searches for a program called ld.{whatever the argument string was}.  This means that you can install lld and create an ld.lld->lld symlink and have -fuse-ld=lld work without having to change the clang code.<br>

<br>
In discussion when I wrote this patch, the consensus was that we should (initially, at least), only support linkers that had command-line syntax compatible with the system linker via this option.  If the linker needs different arguments, then some more invasive changes are required.  This should be enough for users to switch between bfd ld, gold, lld, and mclinker, however (and hopefully bold once it is released) on ELF platforms.<br>

<span class="HOEnZb"><font color="#888888"><br>
David</font></span></blockquote></div><br></div>