nemanjai added a comment.

In D129855#3667191 <https://reviews.llvm.org/D129855#3667191>, @MaskRay wrote:

> In D129855#3662457 <https://reviews.llvm.org/D129855#3662457>, @quinnp wrote:
>
>> In D129855#3657006 <https://reviews.llvm.org/D129855#3657006>, @MaskRay 
>> wrote:
>>
>>> This is not right as using `ld.lld` as the default linker isn't the 
>>> majority case. If you want to change the default for your distribution, set 
>>> `-DCLANG_DEFAULT_LINKER=lld`.
>>> (Alternatively, you can have a `ld` symlink pointing to `lld`.)
>>
>> Hi @MaskRay! Do you mean I should abandon this change or find a way to set 
>> the CMake variable `CLANG_DEFAULT_LINKER` to `lld` as default when building 
>> for PowerPC Linux? I wasn't able to find any examples of people setting 
>> CMake variables for specific distributions.
>>
>> Thanks!
>
> You can customize `CLANG_DEFAULT_LINKER` in your clang distribution. I don't 
> find convincing argument to change the default for `PPCLinuxToolChain` and 
> diverge from `Linux`.

The reason we would like the default linker to be `ld.lld` for most/default 
builds on PPC is because using LTO without the GPL-licensed Gold plugin 
requires LLD. The idea is that a typical user can pull the source and build it 
with minimal CMake macros and get a working LTO without having to build the 
Gold plugin.

Of course, this may not be the way to accomplish this (i.e. this will make it 
diverge from the value specified in `CLANG_DEFAULT_LINKER` in 
`$LLVM_BUILD/tools/clang/include/clang/Config/config.h`). So I would prefer 
that we handle this in the CMake files if @MaskRay doesn't object.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129855/new/

https://reviews.llvm.org/D129855

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to