Skip to content

Commit 6102e3a

Browse files
committed
Fix build failure with cmake version bump
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271582 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 48c41ee commit 6102e3a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ else()
1616
endif()
1717

1818
cmake_minimum_required(VERSION 3.4.3)
19+
# FIXME:
20+
# The OLD behavior (pre 3.2) for this policy is to not set the value of the
21+
# CMAKE_EXE_LINKER_FLAGS variable in the generated test project. The NEW behavior
22+
# for this policy is to set the value of the CMAKE_EXE_LINKER_FLAGS variable
23+
# in the test project to the same as it is in the calling project. The new
24+
# behavior cause the compiler_rt test to fail during try_compile: see
25+
# projects/compiler-rt/cmake/Modules/CompilerRTUtils.cmake:121 such that
26+
# CAN_TARGET_${arch} is not set properly. This results in COMPILER_RT_SUPPORTED_ARCH
27+
# not being updated properly leading to poblems.
28+
cmake_policy(SET CMP0056 OLD)
1929

2030
# FIXME: It may be removed when we use 2.8.12.
2131
if(CMAKE_VERSION VERSION_LESS 2.8.12)

0 commit comments

Comments
 (0)