From 6de939dbe7519f21ba774199e91f7fba9fd55cef Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Tue, 29 Nov 2022 17:34:23 -0800 Subject: [PATCH] [runtimes] Name stripped install targets consistently We were previously naming sub-component stripped install targets as `install-${component}-stripped-${triple}`, whereas everywhere else names them `install-${component}-${triple}-stripped`. This inconsistency would cause issues when LLVM_RUNTIME_DISTRIBUTION_COMPONENTS contained a sub-component (which I'm addding support for next). Reviewed By: phosek, #libc, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D138965 --- llvm/runtimes/CMakeLists.txt | 8 +++++++- runtimes/CMakeLists.txt | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index fd92fd6f3604..a62d9facbb27 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -275,11 +275,17 @@ function(runtime_register_target name target) endif() endforeach() - foreach(target_name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS) + foreach(target_name IN LISTS SUB_COMPONENTS) set(${target_name}-${name} ${target_name}) list(APPEND ${name}_extra_targets ${target_name}-${name}) endforeach() + foreach(target_name IN LISTS SUB_INSTALL_TARGETS) + set(${target_name}-${name} ${target_name}) + set(${target_name}-${name}-stripped ${target_name}-stripped) + list(APPEND ${name}_extra_targets ${target_name}-${name} ${target_name}-${name}-stripped) + endforeach() + foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) set(${component}-${name} ${component}) set(install-${component}-${name} install-${component}) diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 688d912eccfc..df279bb6d082 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -269,9 +269,6 @@ if(SUB_COMPONENTS) if(TARGET install-${component}) list(APPEND SUB_INSTALL_TARGETS install-${component}) endif() - if(TARGET install-${component}-stripped) - list(APPEND SUB_INSTALL_TARGETS install-${component}-stripped) - endif() endforeach() if(LLVM_RUNTIMES_TARGET)