[cfe-dev] Linker selection

Chandler Carruth chandlerc at google.com
Fri Dec 14 03:57:08 PST 2012


On Fri, Dec 14, 2012 at 3:50 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> wrote:

> On 14 Dec 2012, at 11:10, Erik Cederstrand wrote:
>
> > What we really need is a more flexible way of specifying which linker
> the compiler should use internally. Replacing /usr/bin/ld with a symlink is
> not flexible.
>
> In particular, we anticipate a fairly long tail of third-party ports that
> require GNU ld, just as we have a tail that requires libstdc++ and won't
> work with libc++.  The base system will be using libc++ and hopefully will
> be using mclinker, and so will most ports, but we still don't even have
> 100% of ports working with clang yet...
>
> As Chandler says, this is a short-term requirement, but short-term in this
> context means (optimistically) 'the next 3-5 years'.


Note that my point was only that we shouldn't need a custom set of command
line flags for mclinker, and we shouldn't need to switch command line flags
when switching linkers while staying on the same target platform. Thus, we
might consider simple solutions that only address the problem of switching
the link binary used rather than a more complex solution which passes flags
in a new dialect.

Also, my "short-term requirement" was using mclinker as opposed to lld -- I
completely agree that the bfd linker will likely be kicking around and in
use for a long time in a few oddball scenarios.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121214/9ed9637a/attachment.html>


More information about the cfe-dev mailing list