summaryrefslogtreecommitdiff
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2022-06-27 15:53:41 -0400
committerLouis Dionne <ldionne.2@gmail.com>2022-06-27 22:18:19 -0400
commitde4a57cb21a19179d7be830967e642b868a05a91 (patch)
tree808a675b178dcaddeeed480720bb2ebfdb1da59a /libcxx/cmake
parentea1b86127814aff54b2ab821db060865af920437 (diff)
downloadllvm-de4a57cb21a19179d7be830967e642b868a05a91.tar.gz
[libc++] Re-add transitive includes that had been removed since LLVM 14
This commit re-adds transitive includes that had been removed by 4cd04d1687f1, c36870c8e79c, a83f4b9cda57, 1458458b558d, 2e2f3158c604, and 489637e66dd3. This should cover almost all the includes that had been removed since LLVM 14 and that would contribute to breaking user code when releasing LLVM 15. It is possible to disable the inclusion of these headers by defining _LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will enable that macro and start fixing downstream issues immediately. We can then remove the macro (and the transitive includes) by default in a future release. That way, we will break users only once by removing transitive includes in bulk instead of doing it bit by bit a every release, which is more disruptive for users. Note 1: The set of headers to re-add was found by re-generating the transitive include test on a checkout of release/14.x, which provided the list of all transitive includes we used to provide. Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map> have been added in this commit. These transitive inclusions were added when we implemented boyer_moore_searcher in <functional>. Note 3: This is a best effort patch to try and resolve downstream breakage caused since branching LLVM 14. I wasn't able to perfectly mirror transitive includes in LLVM 14 for a few headers, so I added a release note explaining it. To summarize, adding boyer_moore_searcher created a bunch of circular dependencies, so we have to break backwards compatibility in a few cases. Differential Revision: https://reviews.llvm.org/D128661
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/caches/Generic-no-transitive-includes.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/cmake/caches/Generic-no-transitive-includes.cmake b/libcxx/cmake/caches/Generic-no-transitive-includes.cmake
new file mode 100644
index 000000000000..31e807366e16
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-no-transitive-includes.cmake
@@ -0,0 +1,2 @@
+set(LIBCXX_TEST_PARAMS "enable_transitive_includes=False" CACHE STRING "")
+set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")