llvm-project/compiler-rt/cmake/Modules
Bob Haarman ccd6ae25f4 [compiler-rt] respect CMAKE_EXE_LINKER_FLAGS in compiler and library tests
Summary: check_cxx_compiler_flag and check_library_exists could fail because they ignored CMAKE_EXE_LINKER_FLAGS and therefore would always fail to produce executables. Cmake policy CMP0056 fixes this, but was explicitly set to OLD in our CMakeLists because it caused problems with test_target_arch. This change sets the policy to NEW to fix the problem with the compiler and library tests, and temporarily clears CMAKE_EXE_LINKER_FLAGS inside test_target_arch to emulate the old behavior there. This allows, for example, LTO builds that require lld to succeed.

Reviewers: davidxl, beanz

Reviewed By: beanz

Subscribers: fjricci, dberris, mgorny, mehdi_amini, tejohnson, rnk, llvm-commits

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

llvm-svn: 298413
2017-03-21 18:25:35 +00:00
..
AddCompilerRT.cmake Reland "[CMake][compiler-rt] Mark libcxx build for tsan as standalone" 2017-01-16 00:33:02 +00:00
BuiltinTests.cmake Really fix warnings about passing -std=gnu99 to MSVC 2016-09-08 16:25:34 +00:00
CompilerRTCompile.cmake [CMake] Use LLVM_MAIN_SRC_DIR instead of LLVM_SOURCE_DIR. 2016-02-01 21:08:16 +00:00
CompilerRTDarwinUtils.cmake [compiler-rt] respect CMAKE_EXE_LINKER_FLAGS in compiler and library tests 2017-03-21 18:25:35 +00:00
CompilerRTLink.cmake Make cmake link flag naming consistent 2017-01-10 04:33:04 +00:00
CompilerRTUtils.cmake [compiler-rt] respect CMAKE_EXE_LINKER_FLAGS in compiler and library tests 2017-03-21 18:25:35 +00:00
SanitizerUtils.cmake Make cmake link flag naming consistent 2017-01-10 04:33:04 +00:00