[PATCH] D11496: [CMake] Workaround for PR24222: don't fail if we can't target COMPILER_RT_TEST_TARGET_TRIPLE unless it was explicitly set.
Alexey Samsonov
vonosmas at gmail.com
Fri Jul 24 15:01:43 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243170: [CMake] Workaround for PR24222: don't fail if we can't target… (authored by samsonov).
Changed prior to commit:
http://reviews.llvm.org/D11496?vs=30610&id=30611#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11496
Files:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/cmake/config-ix.cmake
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -121,7 +121,8 @@
endif()
if(${CAN_TARGET_${arch}})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}")
+ elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}" AND
+ COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE)
# Bail out if we cannot target the architecture we plan to test.
message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}")
endif()
Index: compiler-rt/trunk/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/CMakeLists.txt
+++ compiler-rt/trunk/CMakeLists.txt
@@ -139,6 +139,13 @@
list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_TEST_TARGET_ARCH)
list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_TEST_TARGET_OS)
list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_TEST_TARGET_ABI)
+# Determine if test target triple is specified explicitly, and doesn't match the
+# default.
+if(NOT COMPILER_RT_TEST_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)
+ set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE TRUE)
+else()
+ set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE FALSE)
+endif()
if ("${COMPILER_RT_TEST_TARGET_ABI}" STREQUAL "androideabi")
set(ANDROID 1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11496.30611.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150724/6792c477/attachment.bin>
More information about the llvm-commits
mailing list