[all-commits] [llvm/llvm-project] 09cebf: Revert "[libc++] Always build c++experimental.a"

Hans via All-commits all-commits at lists.llvm.org
Mon Jul 18 07:57:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09cebfb978def7fa2a4460bca89690f8d3608216
      https://github.com/llvm/llvm-project/commit/09cebfb978def7fa2a4460bca89690f8d3608216
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

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

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




More information about the All-commits mailing list