[lld] r217112 - If lld binary is named 'ld' on darwin, use darwin driver mode
Joerg Sonnenberger
joerg at britannica.bec.de
Fri Sep 5 14:49:55 PDT 2014
On Fri, Sep 05, 2014 at 02:40:04PM -0700, Nick Kledzik wrote:
>
> On Sep 5, 2014, at 2:22 PM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
>
> > On Thu, Sep 04, 2014 at 11:17:46AM -0700, Nick Kledzik wrote:
> >>
> >> On Sep 4, 2014, at 2:00 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> >>
> >>> On Thu, Sep 04, 2014 at 12:03:37AM -0000, Nick Kledzik wrote:
> >>>> Author: kledzik
> >>>> Date: Wed Sep 3 19:03:36 2014
> >>>> New Revision: 217112
> >>>>
> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=217112&view=rev
> >>>> Log:
> >>>> If lld binary is named 'ld' on darwin, use darwin driver mode
> >>>
> >>> I wonder if we can defer this decision until the target triple is
> >>> actually parsed?
> >>
> >> What target triple are you thinking of? For the darwin linker, there is no target triple on the command line.
> >
> > The parsing here is for something like "target-ld", so behavior of ld
> > can/should depend on <target>.
> It does. The case be handled here is when the linker binary is named just “ld” and there is no -flavor option. Previously it always acted like the gnu linker. Now it acts like the darwin linker when running on darwin, otherwise like the gnu linker.
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?
Joerg
More information about the llvm-commits
mailing list