[libc-commits] [libc] b7e20c7 - [libc] Make all targets respect LLVM_PER_TARGET_RUNTIME_DIR (#160597)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 25 05:54:25 PDT 2025


Author: Joseph Huber
Date: 2025-09-25T07:54:21-05:00
New Revision: b7e20c741451bb846e25c87a782d746c2382597a

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

LOG: [libc] Make all targets respect LLVM_PER_TARGET_RUNTIME_DIR (#160597)

Summary:
The libcxx and compiler-rt already install their headers according
to the triple if this option is enabled. We should do this by default so
these don't get mixed up when people potentially combine multiple
toolchains.

Added: 
    

Modified: 
    libc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 4f3704ec9aa9b..14718e2090bde 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -246,7 +246,7 @@ else()
     set(LIBC_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
     set(LIBC_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
   endif()
-  if(LIBC_TARGET_OS_IS_GPU)
+  if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
     if(LIBC_TARGET_TRIPLE)
       set(LIBC_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${LIBC_TARGET_TRIPLE})
     else()


        


More information about the libc-commits mailing list