[all-commits] [llvm/llvm-project] bb9399: [libc++] Always build c++experimental.a

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Jul 8 13:58:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb939931a1adb9a47a2de13c359d6a72aeb277c8
      https://github.com/llvm/llvm-project/commit/bb939931a1adb9a47a2de13c359d6a72aeb277c8
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-07-08 (Fri, 08 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.ctor/default.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.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_pair_const_lvalue_pair.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_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/construct_types.pass.cpp
    M libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.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/default_resource.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:
  -----------
  [libc++] Always build c++experimental.a

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




More information about the All-commits mailing list