<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 8, 2014 at 12:15 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Fri, Sep 05, 2014 at 06:41:26PM -0700, Nick Kledzik wrote:<br>
> > I don't think it does that. parseProgramName gets called for the full<br>
> > name in case of triple prefixing. Your change breaks using e.g.<br>
> > x86_86-netbsd-ld as binary name, doesn't it?<br>
><br>
> It would only be a problem if you built the lld binary on MacOSX,<br>
> renamed it to "x86_86-netbsd-ld” than ran it and expected it to behave<br>
> as a gnu linker.<br>
<br>
</span>It's one way to use it for cross-compiling, so yes, I expect that.<br>
<span class=""><br>
> If you think that is a valid configuration, I can move the #if __APPLE_<br>
> check out of strToFlavor(), and instead inside UniversalDriver::link()<br>
> do a check if argv[0] is exactly “ld” inside  #if __APPLE_ .<br>
<br>
</span>If a triple is given, check if the OS is Darwin(ish). If not, checking<br>
the default/host is fine.<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">
Joerg<br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>