[llvm] [LLVM] Add `LLVM_<proj>_RUNTIME_TARGETS` to set targets per-project (PR #81557)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 08:16:06 PST 2024


================
@@ -269,11 +270,12 @@ endfunction()
 # runtime_register_target(name)
 #   Utility function to register external runtime target.
 function(runtime_register_target name)
-  cmake_parse_arguments(ARG "" "BASE_NAME" "DEPENDS;CMAKE_ARGS;EXTRA_ARGS" ${ARGN})
+  cmake_parse_arguments(ARG "" "BASE_NAME" "DEPENDS;CMAKE_ARGS;EXTRA_ARGS;RUNTIMES" ${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)
 
   set(runtime_names ${RUNTIME_NAMES})
+  set(LLVM_ENABLE_RUNTIMES ${ARG_RUNTIMES})
----------------
petrhosek wrote:

It's confusing to set this variable here since it may imply that it is somehow related to the loop below while it isn't, this should be moved to line 341.

https://github.com/llvm/llvm-project/pull/81557


More information about the llvm-commits mailing list