[libc-commits] [libc] acfb99d - [libc] Specify path for making include/ subdirs (#66589)

via libc-commits libc-commits at lists.llvm.org
Mon Sep 18 21:00:56 PDT 2023


Author: Jeff Bailey
Date: 2023-09-18T21:00:51-07:00
New Revision: acfb99d9fd0a1bc00b06185d3ab71bd2d143efc8

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

LOG: [libc] Specify path for making include/ subdirs (#66589)

When doing a clean build from vscode, it makes the subdirectories in the
source tree rather than in the build folder. Elsehwere in LLVM, they
prefix the MAKE_DIRECTORY calls, so this appears to be the correct
approach.

Added: 
    

Modified: 
    libc/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 2e57275e10bc4cf..fd2cb9351419ca8 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -78,7 +78,7 @@ add_gen_header(
 )
 
 # TODO: This should be conditional on POSIX networking being included.
-file(MAKE_DIRECTORY "arpa")
+file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa)
 
 add_gen_header(
   arpa_inet
@@ -280,7 +280,7 @@ add_gen_header(
 # TODO: Not all platforms will have a include/sys directory. Add the sys
 # directory and the targets for sys/*.h files conditional to the OS requiring
 # them.
-file(MAKE_DIRECTORY "sys")
+file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys)
 
 add_gen_header(
   sys_auxv
@@ -497,7 +497,7 @@ add_gen_header(
 )
 
 if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
-  file(MAKE_DIRECTORY "gpu")
+  file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/gpu)
 
   add_gen_header(
     gpu_rpc


        


More information about the libc-commits mailing list