[PATCH] Add CMake rules for lld-darwin
chandlerc at google.com
Wed Sep 3 15:38:28 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) 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”.
I'm a bit confused.
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.
We might have some highly isolated tests that checked the behavior of "ld"
but they would be inherently platform specific.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits