[PATCH] Add CMake rules for lld-darwin

Rui Ueyama ruiu at google.com
Wed Sep 3 15:40:40 PDT 2014

On Wed, Sep 3, 2014 at 3:33 PM, Nick Kledzik <kledzik at apple.com> wrote:

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

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.

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

Yes tests shouldn't use "RUN: ld" but should use lld with -flavor instead.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140903/cdd2b913/attachment.html>

More information about the llvm-commits mailing list