[PATCH] Always add LLVMgold.so plugin if it's present in the standard location

Chandler Carruth chandlerc at google.com
Fri Feb 21 15:37:51 PST 2014


On Fri, Feb 21, 2014 at 12:08 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > Yeah, it looks like ld errors if it's given a bad option. So, having
> > this as the default won't work smoothly in all cases.
> >
> > What if this were hidden behind a build flag that defaulted to OFF?
> > I.e., you can choose to build a version of clang that always passes
> > gold to ld, but the default would stay the way it currently is.
>
> That is probably fine. Note that we always try to make llvm and clang
> build options be just the default value of a runtime option. Not sure
> if that would be strictly needed in here since the compile time option
> would just be what -flto is during link time.
>

Could we just detect whether the linker is gold in the driver?

That would let us:

1) produce an error if using BFD ld and -flto
2) pass the plugin argument safely in all cases where it would be useful
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140221/1c048142/attachment.html>


More information about the cfe-commits mailing list