From: Shoaib Meenai Date: Wed, 30 Nov 2022 01:38:12 +0000 (-0800) Subject: [runtimes] Support sub-components in LLVM_RUNTIME_DISTRIBUTION_COMPONENTS X-Git-Tag: upstream/17.0.6~25829 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a323e515eee85121c6b85f08eef5acc427d22f83;p=platform%2Fupstream%2Fllvm.git [runtimes] Support sub-components in LLVM_RUNTIME_DISTRIBUTION_COMPONENTS 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 --- diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index a62d9fa..76ad1d6 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -287,10 +287,12 @@ function(runtime_register_target name target) 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)