<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 12:08 PM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> Yeah, it looks like ld errors if it's given a bad option. So, having<br>
> this as the default won't work smoothly in all cases.<br>
><br>
> What if this were hidden behind a build flag that defaulted to OFF?<br>
> I.e., you can choose to build a version of clang that always passes<br>
> gold to ld, but the default would stay the way it currently is.<br>
<br>
</div>That is probably fine. Note that we always try to make llvm and clang<br>
build options be just the default value of a runtime option. Not sure<br>
if that would be strictly needed in here since the compile time option<br>
would just be what -flto is during link time.<br></blockquote><div><br></div><div>Could we just detect whether the linker is gold in the driver?</div><div><br></div><div>That would let us:</div><div><br></div><div>1) produce an error if using BFD ld and -flto</div>
<div>2) pass the plugin argument safely in all cases where it would be useful</div></div></div></div>