[all-commits] [llvm/llvm-project] de4a57: [libc++] Re-add transitive includes that had been ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Jun 27 19:19:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de4a57cb21a19179d7be830967e642b868a05a91
      https://github.com/llvm/llvm-project/commit/de4a57cb21a19179d7be830967e642b868a05a91
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    A libcxx/cmake/caches/Generic-no-transitive-includes.cmake
    M libcxx/docs/ReleaseNotes.rst
    M libcxx/include/algorithm
    M libcxx/include/any
    M libcxx/include/array
    M libcxx/include/atomic
    M libcxx/include/bit
    M libcxx/include/charconv
    M libcxx/include/coroutine
    M libcxx/include/deque
    M libcxx/include/experimental/simd
    M libcxx/include/experimental/unordered_map
    M libcxx/include/ext/hash_map
    M libcxx/include/ext/hash_set
    M libcxx/include/forward_list
    M libcxx/include/functional
    M libcxx/include/future
    M libcxx/include/iterator
    M libcxx/include/list
    M libcxx/include/locale
    M libcxx/include/map
    M libcxx/include/memory
    M libcxx/include/mutex
    M libcxx/include/numeric
    M libcxx/include/optional
    M libcxx/include/ostream
    M libcxx/include/queue
    M libcxx/include/random
    M libcxx/include/regex
    M libcxx/include/set
    M libcxx/include/span
    M libcxx/include/stack
    M libcxx/include/string
    M libcxx/include/string_view
    M libcxx/include/thread
    M libcxx/include/tuple
    M libcxx/include/typeindex
    M libcxx/include/unordered_map
    M libcxx/include/unordered_set
    M libcxx/include/utility
    M libcxx/include/valarray
    M libcxx/include/variant
    M libcxx/include/vector
    M libcxx/test/libcxx/transitive_includes.sh.cpp
    M libcxx/test/libcxx/transitive_includes/expected.algorithm
    M libcxx/test/libcxx/transitive_includes/expected.any
    M libcxx/test/libcxx/transitive_includes/expected.array
    M libcxx/test/libcxx/transitive_includes/expected.atomic
    M libcxx/test/libcxx/transitive_includes/expected.barrier
    M libcxx/test/libcxx/transitive_includes/expected.bit
    M libcxx/test/libcxx/transitive_includes/expected.bitset
    M libcxx/test/libcxx/transitive_includes/expected.ccomplex
    M libcxx/test/libcxx/transitive_includes/expected.charconv
    M libcxx/test/libcxx/transitive_includes/expected.codecvt
    M libcxx/test/libcxx/transitive_includes/expected.complex
    M libcxx/test/libcxx/transitive_includes/expected.condition_variable
    M libcxx/test/libcxx/transitive_includes/expected.coroutine
    M libcxx/test/libcxx/transitive_includes/expected.ctgmath
    M libcxx/test/libcxx/transitive_includes/expected.deque
    M libcxx/test/libcxx/transitive_includes/expected.experimental_algorithm
    M libcxx/test/libcxx/transitive_includes/expected.experimental_coroutine
    M libcxx/test/libcxx/transitive_includes/expected.experimental_deque
    M libcxx/test/libcxx/transitive_includes/expected.experimental_forward_list
    M libcxx/test/libcxx/transitive_includes/expected.experimental_functional
    M libcxx/test/libcxx/transitive_includes/expected.experimental_iterator
    M libcxx/test/libcxx/transitive_includes/expected.experimental_list
    M libcxx/test/libcxx/transitive_includes/expected.experimental_map
    M libcxx/test/libcxx/transitive_includes/expected.experimental_memory_resource
    M libcxx/test/libcxx/transitive_includes/expected.experimental_regex
    M libcxx/test/libcxx/transitive_includes/expected.experimental_set
    M libcxx/test/libcxx/transitive_includes/expected.experimental_simd
    M libcxx/test/libcxx/transitive_includes/expected.experimental_string
    M libcxx/test/libcxx/transitive_includes/expected.experimental_unordered_map
    M libcxx/test/libcxx/transitive_includes/expected.experimental_unordered_set
    M libcxx/test/libcxx/transitive_includes/expected.experimental_utility
    M libcxx/test/libcxx/transitive_includes/expected.experimental_vector
    M libcxx/test/libcxx/transitive_includes/expected.ext_hash_map
    M libcxx/test/libcxx/transitive_includes/expected.ext_hash_set
    M libcxx/test/libcxx/transitive_includes/expected.filesystem
    M libcxx/test/libcxx/transitive_includes/expected.format
    M libcxx/test/libcxx/transitive_includes/expected.forward_list
    M libcxx/test/libcxx/transitive_includes/expected.fstream
    M libcxx/test/libcxx/transitive_includes/expected.functional
    M libcxx/test/libcxx/transitive_includes/expected.future
    M libcxx/test/libcxx/transitive_includes/expected.iomanip
    M libcxx/test/libcxx/transitive_includes/expected.ios
    M libcxx/test/libcxx/transitive_includes/expected.iostream
    M libcxx/test/libcxx/transitive_includes/expected.istream
    M libcxx/test/libcxx/transitive_includes/expected.iterator
    M libcxx/test/libcxx/transitive_includes/expected.latch
    M libcxx/test/libcxx/transitive_includes/expected.list
    M libcxx/test/libcxx/transitive_includes/expected.locale
    M libcxx/test/libcxx/transitive_includes/expected.map
    M libcxx/test/libcxx/transitive_includes/expected.memory
    M libcxx/test/libcxx/transitive_includes/expected.mutex
    M libcxx/test/libcxx/transitive_includes/expected.numeric
    M libcxx/test/libcxx/transitive_includes/expected.optional
    M libcxx/test/libcxx/transitive_includes/expected.ostream
    M libcxx/test/libcxx/transitive_includes/expected.queue
    M libcxx/test/libcxx/transitive_includes/expected.random
    M libcxx/test/libcxx/transitive_includes/expected.ranges
    M libcxx/test/libcxx/transitive_includes/expected.regex
    M libcxx/test/libcxx/transitive_includes/expected.scoped_allocator
    M libcxx/test/libcxx/transitive_includes/expected.semaphore
    M libcxx/test/libcxx/transitive_includes/expected.set
    M libcxx/test/libcxx/transitive_includes/expected.shared_mutex
    M libcxx/test/libcxx/transitive_includes/expected.span
    M libcxx/test/libcxx/transitive_includes/expected.sstream
    M libcxx/test/libcxx/transitive_includes/expected.stack
    M libcxx/test/libcxx/transitive_includes/expected.streambuf
    M libcxx/test/libcxx/transitive_includes/expected.string
    M libcxx/test/libcxx/transitive_includes/expected.string_view
    M libcxx/test/libcxx/transitive_includes/expected.strstream
    M libcxx/test/libcxx/transitive_includes/expected.system_error
    M libcxx/test/libcxx/transitive_includes/expected.thread
    M libcxx/test/libcxx/transitive_includes/expected.tuple
    M libcxx/test/libcxx/transitive_includes/expected.typeindex
    M libcxx/test/libcxx/transitive_includes/expected.unordered_map
    M libcxx/test/libcxx/transitive_includes/expected.unordered_set
    M libcxx/test/libcxx/transitive_includes/expected.utility
    M libcxx/test/libcxx/transitive_includes/expected.valarray
    M libcxx/test/libcxx/transitive_includes/expected.variant
    M libcxx/test/libcxx/transitive_includes/expected.vector
    M libcxx/utils/ci/buildkite-pipeline.yml
    M libcxx/utils/ci/run-buildbot
    M libcxx/utils/libcxx/test/params.py

  Log Message:
  -----------
  [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




More information about the All-commits mailing list