[PATCH] D44773: [CMake] Use custom command and target to install libc++ headers

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 22 00:53:58 PDT 2018


phosek created this revision.
phosek added reviewers: EricWF, beanz.
Herald added subscribers: cfe-commits, christof, fedor.sergeev, mgorny, srhines.

Using file(COPY FILE...) has several downsides. Since the file command
is only executed at configuration time, any changes to headers made
after the initial CMake execution are ignored. This can lead to subtle
errors since the just built Clang will be using stale libc++ headers.
Furthermore, since the headers are copied prior to executing the build
system, this may hide missing dependencies on libc++ from other LLVM
components.

This changes replaces the use of file(COPY FILE...) command with a
custom command and target which addresses all aforementioned issues and
matches the implementation already used by other LLVM components that
also install headers like Clang builtin headers.


Repository:
  rCXX libc++

https://reviews.llvm.org/D44773

Files:
  libcxx/cmake/Modules/HandleLibCXXABI.cmake
  libcxx/include/CMakeLists.txt
  libcxx/lib/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44773.139420.patch
Type: text/x-patch
Size: 8678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180322/58e06ade/attachment-0001.bin>


More information about the cfe-commits mailing list