[libc-commits] [libc] a24a1e0 - [libc][Obvious] Use the current binary dir instead of the base one

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Jun 23 12:33:55 PDT 2023


Author: Joseph Huber
Date: 2023-06-23T14:33:45-05:00
New Revision: a24a1e042f10b49169ecf8233b7de4fce0b76f10

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

LOG: [libc][Obvious] Use the current binary dir instead of the base one

Summary:
We include things off of `libc/include` so we need to use the current
binary dir when setting up the directory.

Added: 
    

Modified: 
    libc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index c22202a9970f3..d4e95fa13cadf 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -85,9 +85,9 @@ set(LIBC_ENABLE_HERMETIC_TESTS ${LLVM_LIBC_FULL_BUILD})
 include(LLVMLibCArchitectures)
 
 if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
-  set(LIBC_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/gpu-none-llvm)
+  set(LIBC_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
   set(LIBC_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/gpu-none-llvm)
-  set(LIBC_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
+  set(LIBC_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib)
 elseif(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND LIBC_ENABLE_USE_BY_CLANG)
   set(LIBC_INCLUDE_DIR ${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE})
   set(LIBC_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})


        


More information about the libc-commits mailing list