hanchenye-llvm-project/llvm/cmake
Shoaib Meenai 72404b801e [cmake] Make check_linker_flags operate via linker flags
`check_linker_flags` currently sets the *compiler* flags (via
`CMAKE_REQUIRED_FLAGS`), and thus implicitly relies on cmake's default
behavior of passing the compiler flags to the linker. This breaks when
cmake's build rules have been altered to not pollute the link line with
compiler flags (which can be desirable for build cleanliness). Instead,
set `CMAKE_EXE_LINKER_FLAGS` explicitly and use `CMP0056` to ensure the
linker flags are passed along. Additionally, since we're inside a
function, we can just alter the variable directly (as the alteration
will be limited to the scope of the function) rather than saving and
restoring the old value.

Differential Revision: https://reviews.llvm.org/D39431

llvm-svn: 316972
2017-10-31 01:30:46 +00:00
..
modules [cmake] Make check_linker_flags operate via linker flags 2017-10-31 01:30:46 +00:00
platforms [CMake] Add variable IOS to iOS toolchain 2017-02-17 01:11:41 +00:00
README
config-ix.cmake Revert 316150 which reinstated r316025. 2017-10-19 08:44:19 +00:00
config.guess Remove Bitrig: LLVM Changes 2017-07-21 22:48:47 +00:00
dummy.cpp
nsis_icon.ico
nsis_logo.bmp

README

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