1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/cmake
Kristina Bessonova 8ae75949b3 [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
2020-07-28 10:11:52 +02:00
..
modules [clang][cmake] Force CMAKE_LINKER for multistage build in case of BOOTSTRAP_LLVM_ENABLE_LLD and MSVC 2020-07-28 10:11:52 +02:00
platforms [CMake] [WinMsvc] Look for includes and libs in ${MSVC_BASE}/atlmfc 2019-10-22 06:36:27 +00:00
config-ix.cmake [CMake] Simplify CMake handling for zlib 2020-07-23 23:05:36 -07:00
config.guess [cmake] configure the host triple on an Apple Silicon machine correctly 2020-06-23 21:08:11 -07:00
dummy.cpp
nsis_icon.ico
nsis_logo.bmp
README

See docs/CMake.html for instructions on how to build LLVM with CMake.