[lld] r217112 - If lld binary is named 'ld' on darwin, use darwin driver mode
Joerg Sonnenberger
joerg at britannica.bec.de
Mon Sep 8 12:15:07 PDT 2014
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.
Joerg
More information about the llvm-commits
mailing list