[libc-commits] [libc] [libc] Specify path for making include/ subdirs (PR #66589)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Mon Sep 18 19:16:02 PDT 2023
================
@@ -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)
----------------
kaladron wrote:
I don't think so. In the libc/CMakeLists.txt there's LIBC_INCLUDE_DIR is redefined a few times, one of which is:
```
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})
```
Whereas LIBC_INCLUDE_DIR is implemented in terms of it:
```
set(LIBC_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
```
Nothing else in this file refers to the CMAKE_CURRENT_BINARY_DIR, but there is other references to LIBC_INCLUDE_DIR:
```
target_include_directories(libc-headers SYSTEM INTERFACE ${LIBC_INCLUDE_DIR})
```
I'm not a CMake expert, though. I'm happy to adjust if that's better!
https://github.com/llvm/llvm-project/pull/66589
More information about the libc-commits
mailing list