[PATCH] D37245: [CMake][runtimes] Use target specific name for all runtimes targets

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 19:46:42 PDT 2017


phosek created this revision.
Herald added a subscriber: mgorny.

We need to use target specific name for all runtimes targets. Target
specific name means the name of target in the LLVM build is different
from the name in runtimes build (in LLVM build, it's suffixed by the
target itself). Previously we have only used target specific names for
check targets collected through SUB_CHECK_TARGETS, but that's not
sufficient, we need to use target specific names for all targets we're
exposing in LLVM build.

      

Fixes PR34335.


Repository:
  rL LLVM

https://reviews.llvm.org/D37245

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -305,22 +305,24 @@
 
     foreach(runtime_name ${runtime_names})
       list(APPEND ${name}_extra_targets
-        ${runtime_name}-${name}
-        install-${runtime_name}-${name})
+        "${runtime_name}:${runtime_name}-${name}"
+        "install-${runtime_name}:install-${runtime_name}-${name}")
       if(LLVM_INCLUDE_TESTS)
-        list(APPEND ${name}_test_targets check-${runtime_name}-${name})
+        list(APPEND ${name}_test_targets "check-${runtime_name}:check-${runtime_name}-${name}")
       endif()
     endforeach()
 
-    foreach(name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS)
-      list(APPEND ${name}_extra_targets "${name}:${name}-${name}")
+    foreach(target_name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS)
+      list(APPEND ${name}_extra_targets "${target_name}:${target_name}-${name}")
     endforeach()
 
     if(LLVM_INCLUDE_TESTS)
-      list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
+      list(APPEND ${name}_test_targets
+        "runtimes-test-depends:runtimes-test-depends-${name}"
+        "check-runtimes:check-runtimes-${name}")
       foreach(target_name IN LISTS SUB_CHECK_TARGETS)
         list(APPEND ${name}_test_targets "${target_name}:${target_name}-${name}")
-        list(APPEND test_targets ${target_name}-${name})
+        list(APPEND test_targets "${target_name}-${name}")
       endforeach()
       set(test_targets "${test_targets}" PARENT_SCOPE)
     endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37245.113013.patch
Type: text/x-patch
Size: 1616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170829/968a62dc/attachment.bin>


More information about the llvm-commits mailing list