[PATCH] D62155: [CMake] Copy C++ headers during config on Darwin

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 11:48:18 PDT 2019


phosek added inline comments.


================
Comment at: llvm/runtimes/CMakeLists.txt:44
+# copied into plae before running any of the build.
+if(APPLE)
+  if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
----------------
This is true for many other platforms, e.g. in our toolchain build it's the case as well. Can we do this unconditionally?


================
Comment at: llvm/runtimes/CMakeLists.txt:46
+  if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES)
+    execute_process(COMMAND ditto ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}/include ${LLVM_INCLUDE_DIR}/c++/v1/)
+  endif()
----------------
smeenai wrote:
> Any reason to prefer this to either `cmake -E copy_directory` or `file(COPY)`?
Even better, could we factor out the logic for copying headers in https://github.com/llvm/llvm-project/blob/master/libcxx/include/CMakeLists.txt#L218 to a separate `.cmake` module (except for the generated `__config` part that can be only done after we've finished configuration) and then reuse it here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62155





More information about the llvm-commits mailing list