[PATCH] D40890: [compiler-rt][xray][cmake] Fix a build issue caused by set/item mixup

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 04:58:34 PST 2017


sdardis created this revision.
Herald added subscribers: arichardson, mgorny.

r319165 introduced a change to CMakeLists.txt for xray where the set of supported
architectures for XRay was iterated over, tested if they could be targeted then
passed to add_compiler_rt_object_libraries. However all targets were passed,
rather than the architecture that was just tested. For cases such as MIPS, where
mips and mips64 are supported, cmake would then test if mips64 could be targetted
resulting in an attempt to produce multiple identical logical target names, falling
afowl of CMP0002.


https://reviews.llvm.org/D40890

Files:
  lib/xray/CMakeLists.txt


Index: lib/xray/CMakeLists.txt
===================================================================
--- lib/xray/CMakeLists.txt
+++ lib/xray/CMakeLists.txt
@@ -95,7 +95,7 @@
 foreach(arch ${XRAY_SUPPORTED_ARCH})
   if(CAN_TARGET_${arch})
     add_compiler_rt_object_libraries(RTXray
-      ARCHS ${XRAY_SUPPORTED_ARCH}
+      ARCHS ${arch}
       SOURCES ${XRAY_SOURCES} CFLAGS ${XRAY_CFLAGS}
       DEFS ${XRAY_COMMON_DEFINITIONS})
     add_compiler_rt_runtime(clang_rt.xray


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40890.125706.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171206/b79ea89a/attachment.bin>


More information about the llvm-commits mailing list