[cfe-dev] LLD to be the default linker in Clang

Renato Golin via cfe-dev cfe-dev at lists.llvm.org
Sun Oct 30 06:14:39 PDT 2016


On 30 October 2016 at 08:40, Peter Smith <peter.smith at linaro.org> wrote:
> For the former, personally I think that clang should follow the
> conventions of the platform wherever possible, i.e. on Linux ld is a
> symlink to ld.XXX which may be ld.lld. I agree with Sean that some
> documentation on how to set up and use lld would be very helpful and
> would be a relatively cheap first step. Some status information about
> how complete each target is would also be useful.

Following the conventions is the best way forward, but not all
platforms use the ld link trick.

However, what harm would there be if there was a flag to override the
convention?


> For the latter, I think it would at first be good to have a simple
> option, or document options that would use lld. When all targets that
> have an lld port can reliably run in the build and test environment we
> can consider making it the default if it has been intentionally
> installed. I don't have a strong opinion on how to set this up.

The "simple flag" would be "simpler" if we had a GNU-style
--with-linker=lld when building LLVM.

We don't, so we have to propagate the -fuse-ld=lld flag on every
invocation from then on (ie. test-suite, becnhmarks, etc).

cheers,
--renato



More information about the cfe-dev mailing list