[libcxx-commits] [PATCH] D83911: [libcxx] Move the libc++ header paths to the common location

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 16 08:45:41 PDT 2020


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/CMakeLists.txt:420
   set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
-  set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
+  set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}/include/c++/v1)
   set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
----------------
Can't we always do `set(LIBCXX_HEADER_DIR "${CMAKE_BINARY_DIR}/something-private/include/c++/v1")`? The place where we stage the headers is an implementation detail of the libc++ build anyway, so it shouldn't matter to any other project.


================
Comment at: libcxx/include/CMakeLists.txt:258
     install(FILES ${file}
-      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
+      DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${LIBCXX_INSTALL_HEADER_DIR}/${dir}
       COMPONENT ${CXX_HEADER_TARGET}
----------------
Why don't we hardcode `${LIBCXX_INSTALL_HEADER_DIR}` as `include/c++/v1` here? I don't see the point in having this additional indirection.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83911/new/

https://reviews.llvm.org/D83911





More information about the libcxx-commits mailing list