1 # This file handles building LLVM runtime sub-projects.
3 # Runtimes are different from tools or other drop-in projects because runtimes
4 # should be built with the LLVM toolchain from the build directory. This file is
5 # a first step to formalizing runtime build interfaces.
7 # In the current state this file only works with compiler-rt, other runtimes
8 # will work as the runtime build interface standardizes.
10 # Find all subdirectories containing CMake projects
12 foreach(entry ${entries})
13 if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
14 list(APPEND runtimes ${entry})
18 # Side-by-side subprojects layout.
19 set(LLVM_ALL_RUNTIMES "libcxx;libcxxabi;libunwind;compiler-rt")
20 set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
21 "Semicolon-separated list of runtimes to build (${LLVM_ALL_RUNTIMES}), or \"all\".")
22 if(LLVM_ENABLE_RUNTIMES STREQUAL "all" )
23 set(LLVM_ENABLE_RUNTIMES ${LLVM_ALL_RUNTIMES})
25 foreach(proj ${LLVM_ENABLE_RUNTIMES})
26 set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
27 if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)
28 list(APPEND runtimes ${proj_dir})
30 message(FATAL_ERROR "LLVM_ENABLE_RUNTIMES requests ${proj} but directory not found: ${proj_dir}")
32 string(TOUPPER "${proj}" canon_name)
33 STRING(REGEX REPLACE "-" "_" canon_name ${canon_name})
34 set(LLVM_EXTERNAL_${canon_name}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
37 function(get_compiler_rt_path path)
38 foreach(entry ${runtimes})
39 get_filename_component(projName ${entry} NAME)
40 if("${projName}" MATCHES "compiler-rt")
41 set(${path} ${entry} PARENT_SCOPE)
47 # If this file is acting as a top-level CMake invocation, this code path is
48 # triggered by the external project call for the runtimes target below.
49 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
51 function(runtime_register_component name)
52 set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name})
55 cmake_minimum_required(VERSION 3.4.3)
56 project(Runtimes C CXX ASM)
58 # Add the root project's CMake modules, and the LLVM build's modules to the
60 list(INSERT CMAKE_MODULE_PATH 0
61 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake"
62 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules"
63 "${LLVM_LIBRARY_DIR}/cmake/llvm"
66 # Some of the runtimes will conditionally use the compiler-rt sanitizers
67 # to make this work smoothly we ensure that compiler-rt is added first in
68 # the list of sub-projects. This allows other sub-projects to have checks
69 # like `if(TARGET asan)` to enable building with asan.
70 get_compiler_rt_path(compiler_rt_path)
72 list(REMOVE_ITEM runtimes ${compiler_rt_path})
73 if(NOT LLVM_BUILD_COMPILER_RT)
74 list(INSERT runtimes 0 ${compiler_rt_path})
78 # LLVMConfig.cmake contains a bunch of CMake variables from the LLVM build.
79 # This file is installed as part of LLVM distributions, so this can be used
80 # either from a build directory or an installed LLVM.
83 # Setting these variables will allow the sub-build to put their outputs into
84 # the library and bin directories of the top-level build.
85 set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR})
86 set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR})
88 # This variable makes sure that e.g. llvm-lit is found.
89 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
90 set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
93 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
96 include(CheckLibraryExists)
97 include(CheckCCompilerFlag)
99 # We don't have libc++ (yet).
100 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nostdlib++")
102 # Avoid checking whether the compiler is working.
103 set(LLVM_COMPILER_CHECKED ON)
105 # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions
106 # resulting in unjustified successes by check_cxx_compiler_flag.
107 set(LLVM_ENABLE_WARNINGS ON)
109 # Handle common options used by all runtimes.
111 include(HandleLLVMOptions)
112 include(FindPythonInterp)
114 # Remove the -nostdlib++ option we've added earlier.
115 string(REPLACE "-nostdlib++" "" CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
117 # This can be used to detect whether we're in the runtimes build.
118 set(RUNTIMES_BUILD ON)
120 foreach(entry ${runtimes})
121 get_filename_component(projName ${entry} NAME)
123 # TODO: Clean this up as part of an interface standardization
124 string(REPLACE "-" "_" canon_name ${projName})
125 string(TOUPPER ${canon_name} canon_name)
127 if(LLVM_RUNTIMES_LIBDIR_SUFFIX)
128 set(${canon_name}_LIBDIR_SUFFIX "${LLVM_RUNTIMES_LIBDIR_SUFFIX}" CACHE STRING "" FORCE)
131 # Setting a variable to let sub-projects detect which other projects
132 # will be included under here.
133 set(HAVE_${canon_name} ON)
136 # We do this in two loops so that HAVE_* is set for each runtime before the
137 # other runtimes are added.
138 foreach(entry ${runtimes})
139 get_filename_component(projName ${entry} NAME)
141 # Between each sub-project we want to cache and clear the LIT properties
142 set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
143 set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)
144 set_property(GLOBAL PROPERTY LLVM_LIT_DEPENDS)
145 set_property(GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
147 add_subdirectory(${entry} ${projName})
149 get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
150 get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
151 get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
152 get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
154 list(APPEND RUNTIMES_LIT_TESTSUITES ${LLVM_LIT_TESTSUITES})
155 list(APPEND RUNTIMES_LIT_PARAMS ${LLVM_LIT_PARAMS})
156 list(APPEND RUNTIMES_LIT_DEPENDS ${LLVM_LIT_DEPENDS})
157 list(APPEND RUNTIMES_LIT_EXTRA_ARGS ${LLVM_LIT_EXTRA_ARGS})
160 if(LLVM_INCLUDE_TESTS)
161 # Add a global check rule now that all subdirectories have been traversed
162 # and we know the total set of lit testsuites.
164 add_lit_target(check-runtimes
165 "Running all regression tests"
166 ${RUNTIMES_LIT_TESTSUITES}
167 PARAMS ${RUNTIMES_LIT_PARAMS}
168 DEPENDS ${RUNTIMES_LIT_DEPENDS}
169 ARGS ${RUNTIMES_LIT_EXTRA_ARGS}
171 add_custom_target(runtimes-test-depends DEPENDS ${RUNTIMES_LIT_DEPENDS})
174 get_property(SUB_COMPONENTS GLOBAL PROPERTY SUB_COMPONENTS)
176 list(REMOVE_DUPLICATES SUB_COMPONENTS)
177 foreach(component ${SUB_COMPONENTS})
178 if(NOT TARGET ${component})
179 message(SEND_ERROR "Missing target for runtime component ${component}!")
183 if(TARGET check-${component})
184 list(APPEND SUB_CHECK_TARGETS check-${component})
187 if(TARGET install-${component})
188 list(APPEND SUB_INSTALL_TARGETS install-${component})
190 if(TARGET install-${component}-stripped)
191 list(APPEND SUB_INSTALL_TARGETS install-${component}-stripped)
195 if(LLVM_RUNTIMES_TARGET)
197 ${CMAKE_CURRENT_SOURCE_DIR}/Components.cmake.in
198 ${LLVM_BINARY_DIR}/runtimes/${LLVM_RUNTIMES_TARGET}/Components.cmake)
201 ${CMAKE_CURRENT_SOURCE_DIR}/Components.cmake.in
202 ${LLVM_BINARY_DIR}/runtimes/Components.cmake)
206 else() # if this is included from LLVM's CMake
207 include(LLVMExternalProjectUtils)
209 if(NOT LLVM_BUILD_RUNTIMES)
210 set(EXTRA_ARGS EXCLUDE_FROM_ALL)
213 function(builtin_default_target compiler_rt_path)
214 llvm_ExternalProject_Add(builtins
215 ${compiler_rt_path}/lib/builtins
216 CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR}
217 -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR}
218 -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
219 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
220 -DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
221 -DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
222 -DCMAKE_C_COMPILER_WORKS=ON
223 -DCMAKE_ASM_COMPILER_WORKS=ON
224 PASSTHROUGH_PREFIXES COMPILER_RT
229 function(builtin_register_target compiler_rt_path target)
230 string(REPLACE "-" ";" builtin_target_list ${target})
231 foreach(item ${builtin_target_list})
232 string(TOLOWER "${item}" item_lower)
233 if(item_lower MATCHES "darwin")
234 message(FATAL_ERROR "LLVM_BUILTIN_TARGETS isn't implemented for Darwin platform!")
238 get_cmake_property(variableNames VARIABLES)
239 foreach(variableName ${variableNames})
240 if(variableName MATCHES "^BUILTINS_${target}")
241 string(REPLACE "BUILTINS_${target}_" "" new_name ${variableName})
242 list(APPEND ${target}_extra_args "-D${new_name}=${${variableName}}")
246 llvm_ExternalProject_Add(builtins-${target}
247 ${compiler_rt_path}/lib/builtins
248 CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR}
249 -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR}
250 -DLLVM_DEFAULT_TARGET_TRIPLE=${target}
251 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
252 -DCMAKE_C_COMPILER_TARGET=${target}
253 -DCMAKE_ASM_COMPILER_TARGET=${target}
254 -DCMAKE_C_COMPILER_WORKS=ON
255 -DCMAKE_ASM_COMPILER_WORKS=ON
256 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
257 ${${target}_extra_args}
258 TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip
263 # If compiler-rt is present we need to build the builtin libraries first. This
264 # is required because the other runtimes need the builtin libraries present
265 # before the just-built compiler can pass the configuration tests.
266 get_compiler_rt_path(compiler_rt_path)
268 if(NOT LLVM_BUILTIN_TARGETS)
269 builtin_default_target(${compiler_rt_path})
271 if("default" IN_LIST LLVM_BUILTIN_TARGETS)
272 builtin_default_target(${compiler_rt_path})
273 list(REMOVE_ITEM LLVM_BUILTIN_TARGETS "default")
275 add_custom_target(builtins)
276 add_custom_target(install-builtins)
277 add_custom_target(install-builtins-stripped)
280 foreach(target ${LLVM_BUILTIN_TARGETS})
281 builtin_register_target(${compiler_rt_path} ${target})
283 add_dependencies(builtins builtins-${target})
284 add_dependencies(install-builtins install-builtins-${target})
285 add_dependencies(install-builtins-stripped install-builtins-${target}-stripped)
289 # We don't need to depend on the builtins if we're building instrumented
290 # because the next stage will use the same compiler used to build this stage.
291 if(NOT LLVM_BUILD_INSTRUMENTED AND CLANG_ENABLE_BOOTSTRAP)
292 add_dependencies(clang-bootstrap-deps builtins)
296 # We create a list the names of all the runtime projects in all uppercase and
297 # with dashes turned to underscores. This gives us the CMake variable prefixes
298 # for all variables that will apply to runtimes.
299 foreach(entry ${runtimes})
300 get_filename_component(projName ${entry} NAME)
301 string(REPLACE "-" "_" canon_name ${projName})
302 string(TOUPPER ${canon_name} canon_name)
303 list(APPEND prefixes ${canon_name})
305 string(FIND ${projName} "lib" LIB_IDX)
307 string(SUBSTRING ${projName} 3 -1 projName)
309 list(APPEND runtime_names ${projName})
312 function(runtime_default_target)
313 cmake_parse_arguments(ARG "" "" "DEPS;PREFIXES" ${ARGN})
315 include(${LLVM_BINARY_DIR}/runtimes/Components.cmake OPTIONAL)
316 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/Components.cmake)
318 foreach(runtime_name ${runtime_names})
319 list(APPEND extra_targets
321 install-${runtime_name}
322 install-${runtime_name}-stripped)
323 if(LLVM_INCLUDE_TESTS)
324 list(APPEND test_targets check-${runtime_name})
327 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
328 if(NOT ${component} IN_LIST SUB_COMPONENTS)
329 list(APPEND extra_targets ${component} install-${component} install-${component}-stripped)
333 if(LLVM_INCLUDE_TESTS)
334 list(APPEND test_targets runtimes-test-depends check-runtimes)
337 llvm_ExternalProject_Add(runtimes
338 ${CMAKE_CURRENT_SOURCE_DIR}
340 # Builtins were built separately above
341 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
342 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
343 -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
344 -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
345 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
346 -DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
347 -DCMAKE_CXX_COMPILER_TARGET=${TARGET_TRIPLE}
348 -DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
349 -DCMAKE_C_COMPILER_WORKS=ON
350 -DCMAKE_CXX_COMPILER_WORKS=ON
351 -DCMAKE_ASM_COMPILER_WORKS=ON
352 PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
354 EXTRA_TARGETS ${extra_targets}
358 ${SUB_INSTALL_TARGETS}
363 # runtime_register_target(target)
364 # Utility function to register external runtime target.
365 function(runtime_register_target name target)
366 cmake_parse_arguments(ARG "" "" "DEPS" ${ARGN})
367 include(${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake OPTIONAL)
368 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake)
370 set(${name}_deps ${ARG_DEPS})
371 if(NOT name STREQUAL target)
372 list(APPEND ${name}_deps runtimes-${target})
375 foreach(runtime_name ${runtime_names})
376 set(${runtime_name}-${name} ${runtime_name})
377 set(install-${runtime_name}-${name} install-${runtime_name})
378 set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped)
379 list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped)
380 if(LLVM_INCLUDE_TESTS)
381 set(check-${runtime_name}-${name} check-${runtime_name} )
382 list(APPEND ${name}_test_targets check-${runtime_name}-${name})
386 foreach(target_name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS)
387 set(${target_name}-${name} ${target_name})
388 list(APPEND ${name}_extra_targets ${target_name}-${name})
391 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
392 set(${component}-${name} ${component})
393 set(install-${component}-${name} ${component})
394 list(APPEND ${name}_extra_targets ${component}-${name} install-${component}-${name})
397 if(LLVM_INCLUDE_TESTS)
398 set(runtimes-test-depends-${name} runtimes-test-depends)
399 set(check-runtimes-${name} check-runtimes)
400 list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
401 foreach(target_name IN LISTS SUB_CHECK_TARGETS)
402 set(${target_name}-${name} ${target_name})
403 list(APPEND ${name}_test_targets ${target_name}-${name})
404 list(APPEND test_targets ${target_name}-${name})
406 set(test_targets "${test_targets}" PARENT_SCOPE)
409 get_cmake_property(variableNames VARIABLES)
410 foreach(variableName ${variableNames})
411 if(variableName MATCHES "^RUNTIMES_${name}")
412 string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
413 list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
414 elseif(variableName MATCHES "^RUNTIMES_${target}")
415 string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
416 list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
420 llvm_ExternalProject_Add(runtimes-${name}
421 ${CMAKE_CURRENT_SOURCE_DIR}
422 DEPENDS ${${name}_deps}
423 # Builtins were built separately above
424 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
425 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
426 -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
427 -DLLVM_DEFAULT_TARGET_TRIPLE=${target}
428 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
429 -DCMAKE_C_COMPILER_TARGET=${target}
430 -DCMAKE_CXX_COMPILER_TARGET=${target}
431 -DCMAKE_ASM_COMPILER_TARGET=${target}
432 -DCMAKE_C_COMPILER_WORKS=ON
433 -DCMAKE_CXX_COMPILER_WORKS=ON
434 -DCMAKE_ASM_COMPILER_WORKS=ON
435 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
436 -DLLVM_RUNTIMES_TARGET=${name}
437 ${${name}_extra_args}
438 PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
439 TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip
440 EXTRA_TARGETS ${${name}_extra_targets}
441 ${${name}_test_targets}
447 # Create a runtimes target that uses this file as its top-level CMake file.
448 # The runtimes target is a configuration of all the runtime libraries
449 # together in a single CMake invocaiton.
450 if(NOT LLVM_RUNTIME_TARGETS)
451 runtime_default_target(
456 if("default" IN_LIST LLVM_RUNTIME_TARGETS)
457 runtime_default_target(
459 PREFIXES ${prefixes})
460 list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default")
462 add_custom_target(runtimes)
463 add_custom_target(runtimes-configure)
464 add_custom_target(install-runtimes)
465 add_custom_target(install-runtimes-stripped)
466 if(LLVM_INCLUDE_TESTS)
467 add_custom_target(check-runtimes)
468 add_custom_target(runtimes-test-depends)
471 if(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS)
472 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
473 add_custom_target(${component})
474 add_custom_target(install-${component})
479 foreach(name ${LLVM_RUNTIME_TARGETS})
480 runtime_register_target(${name} ${name}
484 add_dependencies(runtimes runtimes-${name})
485 add_dependencies(runtimes-configure runtimes-${name}-configure)
486 add_dependencies(install-runtimes install-runtimes-${name})
487 add_dependencies(install-runtimes-stripped install-runtimes-${name}-stripped)
488 if(LLVM_INCLUDE_TESTS)
489 add_dependencies(check-runtimes check-runtimes-${name})
490 add_dependencies(runtimes-test-depends runtimes-test-depends-${name})
494 foreach(sanitizer ${LLVM_RUNTIME_SANITIZERS})
495 if (sanitizer STREQUAL "Address")
496 set(sanitizer_name "asan")
497 elseif (sanitizer STREQUAL "Memory")
498 set(sanitizer_name "msan")
499 elseif (sanitizer STREQUAL "Thread")
500 set(sanitizer_name "tsan")
501 elseif (sanitizer STREQUAL "Undefined")
502 set(sanitizer_name "ubsan")
504 message(FATAL_ERROR "Unsupported value of LLVM_RUNTIME_TARGET_SANITIZERS: ${sanitizers}")
506 foreach(name ${LLVM_RUNTIME_SANITIZER_${sanitizer}_TARGETS})
507 runtime_register_target(${name}-${sanitizer_name} ${name}
508 DEPS runtimes-${name}
509 CMAKE_ARGS -DLLVM_USE_SANITIZER=${sanitizer}
510 -DLLVM_RUNTIMES_PREFIX=${name}/
511 -DLLVM_RUNTIMES_LIBDIR_SUFFIX=/${sanitizer_name}
513 add_dependencies(runtimes runtimes-${name}-${sanitizer_name})
514 add_dependencies(runtimes-configure runtimes-${name}-${sanitizer_name}-configure)
515 add_dependencies(install-runtimes install-runtimes-${name}-${sanitizer_name})
516 add_dependencies(install-runtimes-stripped install-runtimes-${name}-${sanitizer_name}-stripped)
521 # TODO: This is a hack needed because the libcxx headers are copied into the
522 # build directory during configuration. Without that step the clang in the
523 # build directory cannot find the C++ headers in certain configurations.
524 # I need to build a mechanism for runtime projects to provide CMake code
525 # that executes at LLVM configuration time to handle this case.
526 if(NOT LLVM_BUILD_INSTRUMENTED AND CLANG_ENABLE_BOOTSTRAP)
527 add_dependencies(clang-bootstrap-deps runtimes-configure)
530 if(LLVM_INCLUDE_TESTS)
531 set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
532 set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes)
534 set(RUNTIMES_TEST_DEPENDS
545 foreach(target ${test_targets} ${SUB_CHECK_TARGETS})
546 add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})