Skip to content

Commit 268d775

Browse files
authored
[libc] Specify path for making include/ subdirs
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. Tested: Build within vscode Commandline build with: cmake ../llvm -DLLVM_ENABLE_PROJECTS="libc" -DCMAKE_BUILD_TYPE=Debug \ -DLLVM_LIBC_FULL_BUILD=true -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ cmke --build . --target libc (Note that this is Makefile build, not ninja)
1 parent 4a1fe09 commit 268d775

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/include/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ add_gen_header(
7878
)
7979

8080
# TODO: This should be conditional on POSIX networking being included.
81-
file(MAKE_DIRECTORY "arpa")
81+
file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa)
8282

8383
add_gen_header(
8484
arpa_inet
@@ -280,7 +280,7 @@ add_gen_header(
280280
# TODO: Not all platforms will have a include/sys directory. Add the sys
281281
# directory and the targets for sys/*.h files conditional to the OS requiring
282282
# them.
283-
file(MAKE_DIRECTORY "sys")
283+
file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys)
284284

285285
add_gen_header(
286286
sys_auxv
@@ -497,7 +497,7 @@ add_gen_header(
497497
)
498498

499499
if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
500-
file(MAKE_DIRECTORY "gpu")
500+
file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/gpu)
501501

502502
add_gen_header(
503503
gpu_rpc

0 commit comments

Comments
 (0)