diff --git a/llvm/cmake/modules/LLVMDistributionSupport.cmake b/llvm/cmake/modules/LLVMDistributionSupport.cmake --- a/llvm/cmake/modules/LLVMDistributionSupport.cmake +++ b/llvm/cmake/modules/LLVMDistributionSupport.cmake @@ -260,10 +260,10 @@ add_custom_target(install-${distribution_target}-stripped) foreach(target ${distribution_components}) + # Note that some distribution components may not have an actual target, but only an install-FOO target. + # This happens for example if a target is an INTERFACE target. if(TARGET ${target}) add_dependencies(${distribution_target} ${target}) - else() - message(SEND_ERROR "Specified distribution component '${target}' doesn't have a target") endif() if(TARGET install-${target}) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -214,7 +214,7 @@ endforeach() foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) if(NOT ${component} IN_LIST SUB_COMPONENTS) - list(APPEND extra_targets ${component} install-${component} install-${component}-stripped) + list(APPEND extra_targets install-${component} install-${component}-stripped) endif() endforeach()