[compiler-rt] r276148 - [compiler-rt] Fix target architecture matching

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 11:06:32 PDT 2016


Author: fjricci
Date: Wed Jul 20 13:06:31 2016
New Revision: 276148

URL: http://llvm.org/viewvc/llvm-project?rev=276148&view=rev
Log:
[compiler-rt] Fix target architecture matching

Summary:
Use stricter comparisons for architecture. This prevents cmake from failing
for sysroots which can only compile armhf and not arm, since
arm MATCHES armhf is true, while arm STREQUAL armhf is false.

Reviewers: beanz, compnerd

Subscribers: aemerson, llvm-commits

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

Modified:
    compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake

Modified: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake?rev=276148&r1=276147&r2=276148&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake Wed Jul 20 13:06:31 2016
@@ -126,7 +126,7 @@ macro(test_target_arch arch def)
   endif()
   if(${CAN_TARGET_${arch}})
     list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
-  elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "${arch}" AND
+  elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" STREQUAL "${arch}" AND
          COMPILER_RT_HAS_EXPLICIT_DEFAULT_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}")




More information about the llvm-commits mailing list