[PATCH] D83842: [CMake][runtimes] Pass the CMAKE_ARGS to runtimes build correctly

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 19:27:21 PDT 2020


phosek created this revision.
phosek added reviewers: smeenai, beanz.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.

We were relying on CMAKE_ARGS argument to be passed to subbuild, but
this argument was never properly defined. This patch addresses that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83842

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -413,7 +413,7 @@
   # runtime_register_target(target)
   #   Utility function to register external runtime target.
   function(runtime_register_target name target)
-    cmake_parse_arguments(ARG "" "" "DEPENDS" ${ARGN})
+    cmake_parse_arguments(ARG "" "" "DEPENDS;CMAKE_ARGS" ${ARGN})
     include(${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake OPTIONAL)
     set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake)
 
@@ -457,6 +457,7 @@
       set(test_targets "${test_targets}" PARENT_SCOPE)
     endif()
 
+    set(${name}_extra_args ${ARG_CMAKE_ARGS})
     get_cmake_property(variableNames VARIABLES)
     foreach(variableName ${variableNames})
       string(FIND "${variableName}" "RUNTIMES_${target}_" out)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83842.278052.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/c4f6d7ab/attachment.bin>


More information about the llvm-commits mailing list