<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Sep 3, 2014, at 3:25 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><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 id=":fca" class="a3s" 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>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><div><br></div><div>-Nick</div><div><br></div></body></html>