diff options
author | Kristina Bessonova <kbessonova@accesssoftek.com> | 2020-05-29 13:14:51 +0200 |
---|---|---|
committer | Kristina Bessonova <kbessonova@accesssoftek.com> | 2020-07-28 10:11:52 +0200 |
commit | ad4ab81dccaa72d9b5137433a0923d325ff76135 (patch) | |
tree | 2631db59f966443ad788420d70da7b0f66d6fce7 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | c2abdec722f119ebda0cee330fe8dd7bf9c6d506 (diff) | |
download | llvm-ad4ab81dccaa72d9b5137433a0923d325ff76135.zip llvm-ad4ab81dccaa72d9b5137433a0923d325ff76135.tar.gz llvm-ad4ab81dccaa72d9b5137433a0923d325ff76135.tar.bz2 |
[clang][cmake] Force CMAKE_LINKER for multistage build in case of BOOTSTRAP_LLVM_ENABLE_LLD and MSVC
The issue with LLVM_ENABLE_LLD is that it just passes -fuse-ld=lld
to compiler/linker options which makes sense only for those platforms
where cmake invokes a compiler driver for linking. On Windows (MSVC) cmake
invokes the linker directly and requires CMAKE_LINKER to be specified
otherwise it defaults CMAKE_LINKER to be link.exe.
This patch allows BOOTSTRAP_LLVM_ENABLE_LLD to set CMAKE_LINKER in two cases:
* if building for host Windows,
* if crosscompiling for target Windows.
It also skips adding '-fuse-ld=lld' to make lld-link not warning
about 'unknown argument'.
This fixes build with `clang/cmake/caches/DistributionExample.cmake`
on Windows.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D80873
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions