[libc++] Fix compiler-rt build by copying libc++ headers to <build>/include
authorLouis Dionne <ldionne@apple.com>
Wed, 21 Oct 2020 20:52:21 +0000 (16:52 -0400)
committerLouis Dionne <ldionne@apple.com>
Wed, 21 Oct 2020 20:56:33 +0000 (16:56 -0400)
commit69c2087283cf7b17ca75f69daebf4ffc158b754a
tree9c3325043bd8c55813fdb8bb45a838aba07a5aae
parentac2cf07195b5833a888dc6878a9a3cb377ef59ac
[libc++] Fix compiler-rt build by copying libc++ headers to <build>/include

This commit should really be named "Workaround external projects depending
on libc++ build system implementation details". It seems that the compiler-rt
build (and perhaps other projects) is relying on the fact that we copy libc++
and libc++abi headers to `<build-root>/include/c++/v1`. This was changed
by 5d796645, which moved the headers to `<build-root>/projects/libcxx/include/c++/v1`
and broke the compiler-rt build.

I'm committing this workaround to fix the compiler-rt build, but we should
remove reliance on implementation details like that. The correct way to
setup the compiler-rt build would be to "link" against the `cxx-headers`
target in CMake, or to run `install-cxx-headers` using an appropriate
installation prefix, and then manually add a `-I` path to that location.
libcxx/CMakeLists.txt
libcxx/cmake/Modules/HandleLibCXXABI.cmake
libcxx/include/CMakeLists.txt
libcxxabi/test/libcxxabi/test/config.py