[PATCH] D22473: [compiler-rt] Fix target architecture matching

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 13:36:46 PDT 2016


fjricci created this revision.
fjricci added reviewers: beanz, compnerd.
fjricci added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.

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.

https://reviews.llvm.org/D22473

Files:
  cmake/Modules/CompilerRTUtils.cmake

Index: cmake/Modules/CompilerRTUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -126,7 +126,7 @@
   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}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22473.64375.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/eb7aa93c/attachment.bin>


More information about the llvm-commits mailing list