<div dir="ltr"><div class="gmail_extra"><br><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 class="adM"><div class=""><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><br></div><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></blockquote></div><div class="gmail_extra"><br></div>I'm a bit confused.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I wouldn't expect to test the behavior of the binary when named "ld" in many places. Most of the test suite should just invoke "lld" and say what flavor it wants.</div><div class="gmail_extra"><br></div><div class="gmail_extra">We might have some highly isolated tests that checked the behavior of "ld" but they would be inherently platform specific.<br><br></div></div>