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

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 06:03:41 PST 2017


Author: sdardis
Date: Wed Dec  6 06:03:41 2017
New Revision: 319893

URL: http://llvm.org/viewvc/llvm-project?rev=319893&view=rev
Log:
[compiler-rt][xray][cmake] Fix a build issue caused by set/item mixup

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.

Reviewers: dberris

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

Modified:
    compiler-rt/trunk/lib/xray/CMakeLists.txt

Modified: compiler-rt/trunk/lib/xray/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/CMakeLists.txt?rev=319893&r1=319892&r2=319893&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/xray/CMakeLists.txt Wed Dec  6 06:03:41 2017
@@ -95,7 +95,7 @@ else()
 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




More information about the llvm-commits mailing list