[libc++] Include <__config_site> from <__config>
authorLouis Dionne <ldionne@apple.com>
Fri, 26 Jun 2020 16:08:59 +0000 (12:08 -0400)
committerPetr Hosek <phosek@google.com>
Tue, 30 Mar 2021 21:06:11 +0000 (14:06 -0700)
commitc06a8f9caa51c7ea71dac716e0a35f5e343e4546
tree99c01001fe019bf7fe47750c5661f293d8da1bd4
parent3a6365a439ede4b7c65076bb42b1b7dbf72216b5
[libc++] Include <__config_site> from <__config>

Prior to this patch, we would generate a fancy <__config> header by
concatenating <__config_site> and <__config>. This complexifies the
build system and also increases the difference between what's tested
and what's actually installed.

This patch removes that complexity and instead simply installs <__config_site>
alongside the libc++ headers. <__config_site> is then included by <__config>,
which is much simpler. Doing this also opens the door to having different
<__config_site> headers depending on the target, which was impossible before.

It does change the workflow for testing header-only changes to libc++.
Previously, we would run `lit` against the headers in libcxx/include.
After this patch, we run it against a fake installation root of the
headers (containing a proper <__config_site> header). This makes use
closer to testing what we actually install, which is good, however it
does mean that we have to update that root before testing header changes.
Thus, we now need to run `ninja check-cxx-deps` before running `lit` by
hand.

Differential Revision: https://reviews.llvm.org/D97572
libcxx/CMakeLists.txt
libcxx/benchmarks/CMakeLists.txt
libcxx/cmake/Modules/HandleLibCXXABI.cmake
libcxx/docs/TestingLibcxx.rst
libcxx/include/CMakeLists.txt
libcxx/include/__config
libcxx/test/configs/legacy.cfg.in
libcxx/utils/ci/run-buildbot
libcxx/utils/libcxx/test/config.py
libcxxabi/test/libcxxabi/test/config.py
libunwind/test/libunwind/test/config.py