[PATCH] D144660: [compiler-rt][CMake] Properly set COMPILER_RT_HAS_LLD
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 11:51:20 PDT 2023
barannikov88 added a comment.
In D144660#4381813 <https://reviews.llvm.org/D144660#4381813>, @aeubanks wrote:
> In D144660#4381808 <https://reviews.llvm.org/D144660#4381808>, @barannikov88 wrote:
>
>> This still does not look right to me. The fact that lld is on the `LLVM_ENABLE_PROJECT` list does not mean that it is used for linking runtime libraries.
>> I add lld to the list because I use it to link x86 binaries, but I build runtimes for a different architecture and use a different linker for that.
>> This should be a per-target check somehow. AIUI it should check some `RUNTIME_<triple>_` variable, presumably `RUNTIME_<triple>_LLVM_USE_LINKER` or `RUNTIME_<triple>_LLVM_ENABLE_LLD`.
>
> the `compiler-rt/CMakeLists.txt` change does check `LLVM_USE_LINKER`. the `RUNTIME_*_LLVM_USE_LINKER` gets translated to `LLVM_USE_LINKER` by the time `compiler-rt/CMakeLists.txt` is invoked
Right, thanks. Then I have no objection here.
I'm confused about these lines:
> llvm/runtimes/CMakeLists.txt:250: PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
> llvm/runtimes/CMakeLists.txt:251: LLVM_USE_LINKER
> llvm/runtimes/CMakeLists.txt:326: list(APPEND ${name}_extra_args -DLLVM_USE_LINKER=${LLVM_USE_LINKER})
But I guess this is a different story…
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144660/new/
https://reviews.llvm.org/D144660
More information about the llvm-commits
mailing list