<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 3, 2014 at 3:33 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br><div><div>On Sep 3, 2014, at 3:25 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</div>

<br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 3, 2014 at 3:16 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="overflow:hidden">I'm OK with this approach, but the other approach would be to<br>
make "ld" smarter. The name "ld" is currently mapped to gnu_ld<br>
but it's deprecated, so we can replace it with a dispatcher which<br>
dispatch according to the system -- to darwin if compiled for Darwin<br>
and gnu_ld for other Unices. Then you don't need to rename<br>
lld-drawin to ld when installing.</div></blockquote></div><br>Personally, I think it makes sense when the binary name is 'ld' to pick the default flavor based on the host. It still allows cross compiling toolchains to use a triple-prefixed '...-ld' binary name to default to their desired target.</div>

</div>
</blockquote></div><br></div></div><div>Interesting.  So we special case if the binary name (really argv[0]) is “ld” to look at the host.  If the binary is named “lld” (or any triple) then the current behavior remains.  </div>

</div></blockquote><div><br></div><div>Yes, lld will keep the current behavior, but ld will be a "universal driver for unix-like systems" which automatically dispatches for your system if no other triples are given.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>My only concern is that test cases never use “RUN:  ld”.  They would seem to run fine locally before committing, but then break on various bots.  I suppose that would be minimized if the make files in lld never created a binary named “ld”.  </div>

</div></blockquote><div><br></div><div>Yes tests shouldn't use "RUN: ld" but should use lld with -flavor instead.</div></div></div></div>