llvm.org GIT mirror llvm / e605bbd
[CMake] Support runtimes in distributions Summary: This patch adds a new internal variable LLVM_RUNTIME_DISTRIBUTION_COMPONENTS which specifies distribution components that are part of runtime projects, and thus should be exposed from runtime configuraitons up into the top-level CMake configurations. This is required for allowing runtime components to be included in LLVM_DISTRIBUTION_COMPONENTS because we verify that the build and install targets exist for every component specified for the distribution. Without this patch runtimes and builtins can only be included in distributions in whole, not by component. Reviewers: phosek Reviewed By: phosek Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332631 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 1 year, 4 months ago
2 changed file(s) with 20 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
997997 add_custom_target(distribution)
998998 add_custom_target(install-distribution)
999999 add_custom_target(install-distribution-stripped)
1000 foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
1000 foreach(target ${LLVM_DISTRIBUTION_COMPONENTS} ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
10011001 if(TARGET ${target})
10021002 add_dependencies(distribution ${target})
10031003 else()
349349 install-${runtime_name}-stripped)
350350 if(LLVM_INCLUDE_TESTS)
351351 list(APPEND test_targets check-${runtime_name})
352 endif()
353 endforeach()
354 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
355 if(NOT ${component} IN_LIST SUB_COMPONENTS)
356 list(APPEND extra_targets ${component} install-${component} install-${component}-stripped)
352357 endif()
353358 endforeach()
354359
404409
405410 foreach(target_name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS)
406411 list(APPEND ${name}_extra_targets "${target_name}:${target_name}-${name}")
412 endforeach()
413
414 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
415 if(NOT "${target_name}:${target_name}-${component}" IN_LIST extra_targets)
416 list(APPEND ${name}_extra_targets
417 "${target_name}:${target_name}-${component}"
418 "${target_name}:${target_name}-install-${component}")
419 endif()
407420 endforeach()
408421
409422 if(LLVM_INCLUDE_TESTS)
477490 add_custom_target(runtimes-test-depends)
478491 set(test_targets "")
479492 endif()
493 if(LLVM_RUNTIME_DISTRIBUTION_COMPONENTS)
494 foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
495 add_custom_target(${component})
496 add_custom_target(install-${component})
497 endforeach()
498 endif()
480499 endif()
481500
482501 foreach(name ${LLVM_RUNTIME_TARGETS})