[PATCH] D38290: Add a ld64.lld alias for the MACHO LLD target

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 13:18:28 PDT 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D38290#885503, @ruiu wrote:

> This patch virtually sets `ld64` the linker command name for macOS. I'd be a bit reluctant doing that, because `ld64` sounds like a too generic name to indicate "a linker for macOS". But that's probably okay because we don't have a better name.


It's not a good name, but I do believe it is recognizable as the Darwin linker. It's also consistent with the names we invent on other platforms, which are essentially "native linker binary name plus lld".

> Can you get an LGTM from someone who owns the clang driver?

lgtm

Thinking *LONG LONG* term, what I want to see happen is:

1. Annotate the exported C++ API of libLLVM.so to ensure that this does not regress clang compilation time (avoids PLT indirection for calls internal to LLVM)
2. Build with -fvisibility=hidden, so MachO and ELF builds of LLVM work like COFF
3. Make building LLVM.dll/libLLVM.dylib/libLLVM.so the default
4. Stop busy-boxing the LLD ports, and have separate executables for each: ld64.lld, lld-link.exe, and ld.lld

This will save disk space and potentially runtime if the loader keeps the LLVM shared object in memory, rather than loading a second copy for every link step in the buidl.


Repository:
  rL LLVM

https://reviews.llvm.org/D38290





More information about the cfe-commits mailing list