[PATCH] Add CMake rules for lld-darwin

Nick Kledzik kledzik at apple.com
Wed Sep 3 15:33:11 PDT 2014


On Sep 3, 2014, at 3:25 PM, Chandler Carruth <chandlerc at google.com> wrote:

> 
> On Wed, Sep 3, 2014 at 3:16 PM, Rui Ueyama <ruiu at google.com> wrote:
> I'm OK with this approach, but the other approach would be to
> make "ld" smarter. The name "ld" is currently mapped to gnu_ld
> but it's deprecated, so we can replace it with a dispatcher which
> dispatch according to the system -- to darwin if compiled for Darwin
> and gnu_ld for other Unices. Then you don't need to rename
> lld-drawin to ld when installing.
> 
> 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.

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.  

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”.  

-Nick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140903/209dcf01/attachment.html>


More information about the llvm-commits mailing list