[libcxx-commits] [PATCH] D97572: [libc++] Include <__config_site> from <__config>

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 26 12:27:47 PST 2021


phosek created this revision.
phosek added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, arichardson, mgorny.
Herald added a project: libunwind.
Herald added a reviewer: libunwind.
phosek requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: Sanitizers, sstefan1.
Herald added projects: Sanitizers, libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

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.

This commit was originally applied in 5d796645d <https://reviews.llvm.org/rG5d796645d6c8cadeb003715c33e231a8ba05b6de> and reverted in 48e4b0fd3 <https://reviews.llvm.org/rG48e4b0fd3a3d68cc9774699964cf4c6c2be38cf3>
because it broke several bots. The issues should have been addressed now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97572

Files:
  compiler-rt/cmake/Modules/CustomLibcxx/CMakeLists.txt
  compiler-rt/lib/fuzzer/CMakeLists.txt
  compiler-rt/lib/fuzzer/tests/CMakeLists.txt
  compiler-rt/lib/msan/tests/CMakeLists.txt
  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/libcxx/test/config.py
  libcxxabi/CMakeLists.txt
  libcxxabi/src/CMakeLists.txt
  libcxxabi/test/libcxxabi/test/config.py
  libunwind/test/libunwind/test/config.py
  runtimes/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97572.326770.patch
Type: text/x-patch
Size: 21036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210226/45725127/attachment-0001.bin>


More information about the libcxx-commits mailing list