[llvm] 6de939d - [runtimes] Name stripped install targets consistently

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 11:15:27 PST 2022


Author: Shoaib Meenai
Date: 2022-11-30T11:14:37-08:00
New Revision: 6de939dbe7519f21ba774199e91f7fba9fd55cef

URL: https://github.com/llvm/llvm-project/commit/6de939dbe7519f21ba774199e91f7fba9fd55cef
DIFF: https://github.com/llvm/llvm-project/commit/6de939dbe7519f21ba774199e91f7fba9fd55cef.diff

LOG: [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

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt
    runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index fd92fd6f36040..a62d9facbb274 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 688d912eccfcb..df279bb6d082a 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)


        


More information about the llvm-commits mailing list