[llvm-branch-commits] [compiler-rt-branch] r243278 - Merging r243170:

Hans Wennborg hans at hanshq.net
Mon Jul 27 09:42:42 PDT 2015


Author: hans
Date: Mon Jul 27 11:42:42 2015
New Revision: 243278

URL: http://llvm.org/viewvc/llvm-project?rev=243278&view=rev
Log:
Merging r243170:
------------------------------------------------------------------------
r243170 | samsonov | 2015-07-24 15:01:07 -0700 (Fri, 24 Jul 2015) | 14 lines

[CMake] Workaround for PR24222: don't fail if we can't target COMPILER_RT_TEST_TARGET_TRIPLE unless it was explicitly set.

Summary:
Although we assume that we can always target host triple, relax
this check to avoid failing at configure-time for cases when we are
not able to correctly infer/verify host triple for some reasons.

See http://llvm.org/bugs/show_bug.cgi?id=24222 for more details.

Reviewers: hans

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11496
------------------------------------------------------------------------

Modified:
    compiler-rt/branches/release_37/   (props changed)
    compiler-rt/branches/release_37/CMakeLists.txt
    compiler-rt/branches/release_37/cmake/config-ix.cmake

Propchange: compiler-rt/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 27 11:42:42 2015
@@ -1 +1 @@
-/compiler-rt/trunk:242350,242424,242444,242449,242539-242540,242647,242651
+/compiler-rt/trunk:242350,242424,242444,242449,242539-242540,242647,242651,243170

Modified: compiler-rt/branches/release_37/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_37/CMakeLists.txt?rev=243278&r1=243277&r2=243278&view=diff
==============================================================================
--- compiler-rt/branches/release_37/CMakeLists.txt (original)
+++ compiler-rt/branches/release_37/CMakeLists.txt Mon Jul 27 11:42:42 2015
@@ -139,6 +139,13 @@ string(REPLACE "-" ";" TARGET_TRIPLE_LIS
 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)

Modified: compiler-rt/branches/release_37/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_37/cmake/config-ix.cmake?rev=243278&r1=243277&r2=243278&view=diff
==============================================================================
--- compiler-rt/branches/release_37/cmake/config-ix.cmake (original)
+++ compiler-rt/branches/release_37/cmake/config-ix.cmake Mon Jul 27 11:42:42 2015
@@ -120,7 +120,8 @@ macro(test_target_arch arch def)
   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()





More information about the llvm-branch-commits mailing list