Revert "[libc++] Always build c++experimental.a"
authorHans Wennborg <hans@chromium.org>
Mon, 18 Jul 2022 14:34:34 +0000 (16:34 +0200)
committerHans Wennborg <hans@chromium.org>
Mon, 18 Jul 2022 14:57:15 +0000 (16:57 +0200)
commit09cebfb978def7fa2a4460bca89690f8d3608216
tree85ec471adef7c4582b611ed397126093ef8b0c02
parent24ec521cd7bb51447f4ab03460d91c57378d49f7
Revert "[libc++] Always build c++experimental.a"

This caused build failures when building Clang and libc++ together on Mac:

  fatal error: 'experimental/memory_resource' file not found

See the code review for details. Reverting until the problem and how to
solve it is better understood.

(Updates to some test files were not reverted, since they seemed
unrelated and were later updated by 340b48b267b96.)

> This is the first part of a plan to ship experimental features
> by default while guarding them behind a compiler flag to avoid
> users accidentally depending on them. Subsequent patches will
> also encompass incomplete features (such as <format> and <ranges>)
> in that categorization. Basically, the idea is that we always
> build and ship the c++experimental library, however users can't
> use what's in it unless they pass the `-funstable` flag to Clang.
>
> Note that this patch intentionally does not start guarding
> existing <experimental/FOO> content behind the flag, because
> that would merely break users that might be relying on such
> content being in the headers unconditionally. Instead, we
> should start guarding new TSes behind the flag, and get rid
> of the existing TSes we have by shipping their Standard
> counterpart.
>
> Also, this patch must jump through a few hoops like defining
> _LIBCPP_ENABLE_EXPERIMENTAL because we still support compilers
> that do not implement -funstable yet.
>
> Differential Revision: https://reviews.llvm.org/D128927

This reverts commit bb939931a1adb9a47a2de13c359d6a72aeb277c8.
33 files changed:
clang/cmake/caches/Fuchsia-stage2.cmake
clang/cmake/caches/Fuchsia.cmake
compiler-rt/cmake/Modules/AddCompilerRT.cmake
libcxx/CMakeLists.txt
libcxx/appveyor.yml
libcxx/cmake/caches/AIX.cmake
libcxx/cmake/caches/Apple.cmake
libcxx/cmake/caches/Generic-no-experimental.cmake
libcxx/docs/BuildingLibcxx.rst
libcxx/docs/UsingLibcxx.rst
libcxx/src/CMakeLists.txt
libcxx/test/CMakeLists.txt
libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp
libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
libcxx/utils/ci/run-buildbot
libcxx/utils/libcxx/test/params.py