[lld] r217112 - If lld binary is named 'ld' on darwin, use darwin driver mode

Rui Ueyama ruiu at google.com
Mon Sep 8 13:23:21 PDT 2014


On Mon, Sep 8, 2014 at 12:15 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Fri, Sep 05, 2014 at 06:41:26PM -0700, Nick Kledzik wrote:
> > > I don't think it does that. parseProgramName gets called for the full
> > > name in case of triple prefixing. Your change breaks using e.g.
> > > x86_86-netbsd-ld as binary name, doesn't it?
> >
> > It would only be a problem if you built the lld binary on MacOSX,
> > renamed it to "x86_86-netbsd-ld” than ran it and expected it to behave
> > as a gnu linker.
>
> It's one way to use it for cross-compiling, so yes, I expect that.
>
> > If you think that is a valid configuration, I can move the #if __APPLE_
> > check out of strToFlavor(), and instead inside UniversalDriver::link()
> > do a check if argv[0] is exactly “ld” inside  #if __APPLE_ .
>
> If a triple is given, check if the OS is Darwin(ish). If not, checking
> the default/host is fine.
>

I don't see a strong reason to do that, as one can always use lld with
-target option instead of renaming an executable file, but it wouldn't
hurt. So if someone wants such behavior I don't object.

Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140908/f0dc9fd0/attachment.html>


More information about the llvm-commits mailing list