Right now, sub-components are only accounted for when the runtime has
been configured and the main LLVM configure is rerun after that. We can
make use of LLVM_RUNTIME_DISTRIBUTION_COMPONENTS to make sub-component
targets available from the start, but that currently clashes with the
sub-component target generation once they are picked up. Make sure we
don't create duplicate targets; an analogous check already exists in
runtime_default_target.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D138966
endforeach()
foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
- set(${component}-${name} ${component})
- set(install-${component}-${name} install-${component})
- set(install-${component}-${name}-stripped install-${component}-stripped)
- list(APPEND ${name}_extra_targets ${component}-${name} install-${component}-${name} install-${component}-${name}-stripped)
+ if(NOT component IN_LIST SUB_COMPONENTS)
+ set(${component}-${name} ${component})
+ set(install-${component}-${name} install-${component})
+ set(install-${component}-${name}-stripped install-${component}-stripped)
+ list(APPEND ${name}_extra_targets ${component}-${name} install-${component}-${name} install-${component}-${name}-stripped)
+ endif()
endforeach()
if(LLVM_INCLUDE_TESTS)