[libc++] Treat incomplete features just like other experimental features

In particular remove the ability to expel incomplete features from the
library at configure-time, since this can now be done through the
_LIBCPP_ENABLE_EXPERIMENTAL macro.

Also, never provide symbols related to incomplete features inside the
dylib, instead provide them in c++experimental.a (this changes the
symbols list, but not for any configuration that should have shipped).

Differential Revision: https://reviews.llvm.org/D128928
This commit is contained in:
Louis Dionne 2022-06-30 11:57:52 -04:00
parent 7300a651f5
commit 8711fcae27
27 changed files with 30 additions and 2238 deletions

View File

@ -101,11 +101,6 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
to provide compile-time errors when using features unavailable on some version of
the shared library they shipped should turn this on and see `include/__availability`
for more details." OFF)
option(LIBCXX_ENABLE_INCOMPLETE_FEATURES
"Whether to enable support for incomplete library features. Incomplete features
are new library features under development. These features don't guarantee
ABI stability nor the quality of completed library features. Vendors
shipping the library may want to disable this option." ON)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
@ -866,10 +861,6 @@ if (LIBCXX_ENABLE_ASSERTIONS)
else()
config_define(0 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT)
endif()
# Incomplete features get their own specific disabling flags. This makes it
# easier to grep for target specific flags once the feature is complete.
config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_RANGES)
if (LIBCXX_ABI_DEFINES)
set(abi_defines)

View File

@ -123,10 +123,7 @@ function(add_benchmark_test name source_file)
else()
target_link_libraries(${libcxx_target} PRIVATE cxx_static)
endif()
if (TARGET cxx_experimental)
target_link_libraries(${libcxx_target} PRIVATE cxx_experimental)
endif()
target_link_libraries(${libcxx_target} PRIVATE -lbenchmark)
target_link_libraries(${libcxx_target} PRIVATE cxx_experimental benchmark)
if (LLVM_USE_SANITIZER)
target_link_libraries(${libcxx_target} PRIVATE -ldl)
endif()
@ -160,6 +157,7 @@ endfunction()
# Register Benchmark tests
#==============================================================================
set(BENCHMARK_TESTS
algorithms.partition_point.bench.cpp
algorithms/lower_bound.bench.cpp
algorithms/make_heap.bench.cpp
algorithms/make_heap_then_sort_heap.bench.cpp
@ -176,13 +174,19 @@ set(BENCHMARK_TESTS
algorithms/sort.bench.cpp
algorithms/sort_heap.bench.cpp
algorithms/stable_sort.bench.cpp
algorithms.partition_point.bench.cpp
allocation.bench.cpp
deque.bench.cpp
filesystem.bench.cpp
format_to_n.bench.cpp
format_to.bench.cpp
format.bench.cpp
formatted_size.bench.cpp
formatter_float.bench.cpp
formatter_int.bench.cpp
function.bench.cpp
map.bench.cpp
ordered_set.bench.cpp
std_format_spec_string_unicode.bench.cpp
string.bench.cpp
stringstream.bench.cpp
to_chars.bench.cpp
@ -194,18 +198,6 @@ set(BENCHMARK_TESTS
vector_operations.bench.cpp
)
if (LIBCXX_ENABLE_INCOMPLETE_FEATURES)
set(BENCHMARK_TESTS
${BENCHMARK_TESTS}
format_to_n.bench.cpp
format_to.bench.cpp
format.bench.cpp
formatted_size.bench.cpp
formatter_float.bench.cpp
formatter_int.bench.cpp
std_format_spec_string_unicode.bench.cpp)
endif()
foreach(test_path ${BENCHMARK_TESTS})
get_filename_component(test_file "${test_path}" NAME)
string(REPLACE ".bench.cpp" "" test_name "${test_file}")

View File

@ -9,7 +9,6 @@ set(LIBCXX_ENABLE_SHARED ON CACHE BOOL "")
set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "")
set(LIBCXX_ENABLE_BACKWARDS_COMPATIBILITY_DEBUG_MODE_SYMBOLS OFF CACHE BOOL "")
set(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS ON CACHE BOOL "")
set(LIBCXX_ENABLE_INCOMPLETE_FEATURES OFF CACHE BOOL "")
set(LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
set(LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")

View File

@ -1,3 +1,2 @@
set(LIBCXX_TEST_PARAMS "enable_experimental=False" CACHE STRING "")
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
set(LIBCXX_ENABLE_INCOMPLETE_FEATURES OFF CACHE BOOL "")

View File

@ -265,15 +265,6 @@ libc++ specific options
support for ``wchar_t``. This is especially useful in embedded settings where
C Standard Libraries don't always provide all the usual bells and whistles.
.. option:: LIBCXX_ENABLE_INCOMPLETE_FEATURES:BOOL
**Default**: ``ON``
Whether to enable support for incomplete library features. Incomplete features
are new library features under development. These features don't guarantee
ABI stability nor the quality of completed library features. Vendors
shipping the library may want to disable this option.
.. option:: LIBCXX_INSTALL_LIBRARY_DIR:PATH
**Default**: ``lib${LIBCXX_LIBDIR_SUFFIX}``

View File

@ -86,97 +86,3 @@ abilist for the platform, e.g.:
* C++20 for the Linux platform.
* MacOS C++20 for the Apple platform.
Working on large features
=========================
Libc++ makes no guarantees about the implementation status or the ABI stability
of features that have not yet been ratified in the C++ Standard. After the C++
Standard is ratified libc++ promises a conforming and ABI-stable
implementation. When working on a large new feature in the ratified version of
the C++ Standard that can't be finished before the next release branch is
created, we can't honor this promise. Another reason for not being able to
promise ABI stability happens when the C++ Standard committee retroactively
accepts ABI breaking papers as defect reports against the ratified C++
Standard.
When working on these features it should be possible for libc++ vendors to
disable these incomplete features, so they can promise ABI stability to their
customers. This is done by the CMake option
``LIBCXX_ENABLE_INCOMPLETE_FEATURES``. When start working on a large feature
the following steps are required to guard the new library with the CMake
option.
* ``libcxx/CMakeLists.txt``: Add
.. code-block:: cmake
config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_FOO)
* ``libcxx/include/__config_site.in``: Add
.. code-block:: c++
#cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_FOO
* ``libcxx/include/foo``: The contents of the file should be guarded in an
``ifdef`` and always include ``<version>``
.. code-block:: c++
#ifndef _LIBCPP_FOO
#define _LIBCPP_FOO
// Make sure all feature-test macros are available.
#include <version>
// Enable the contents of the header only when libc++ was built with LIBCXX_ENABLE_INCOMPLETE_FEATURES.
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FOO)
...
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FO0)
#endif // _LIBCPP_FOO
* ``libcxx/src/CMakeLists.txt``: When the library has a file ``foo.cpp`` it
should only be added when ``LIBCXX_ENABLE_INCOMPLETE_FEATURES`` is enabled
.. code-block:: cmake
if(LIBCXX_ENABLE_INCOMPLETE_FEATURES)
list(APPEND LIBCXX_SOURCES
foo.cpp
)
endif()
* ``libcxx/utils/generate_feature_test_macro_components.py``: Add to
``lit_markup``
.. code-block:: python
"foo": ["UNSUPPORTED: libcpp-has-no-incomplete-foo"],
* ``libcxx/utils/generate_header_inclusion_tests.py``: Add to ``lit_markup``
.. code-block:: python
"foo": ["UNSUPPORTED: libcpp-has-no-incomplete-foo"],
* ``libcxx/utils/generate_header_tests.py``: Add to ``header_markup``
.. code-block:: python
"foo": ["ifndef _LIBCPP_HAS_NO_INCOMPLETE_FOO"],
* ``libcxx/utils/libcxx/test/features.py``: Add to ``macros``
.. code-block:: python
'_LIBCPP_HAS_NO_INCOMPLETE_FOO': 'libcpp-has-no-incomplete-foo',
* All tests that include ``<foo>`` should contain
.. code-block:: c++
// UNSUPPORTED: libcpp-has-no-incomplete-foo
Once the library is complete these changes and guards should be removed.

View File

@ -42,7 +42,7 @@ Paper Status
.. [#note-P0600] P0600: The missing bits in P0600 are in |sect|\ [mem.res.class] and |sect|\ [mem.poly.allocator.class].
.. [#note-P0645] P0645: The paper is implemented but still marked as an incomplete feature
(the feature-test macro is not set and the libary is only available when built with ``LIBCXX_ENABLE_INCOMPLETE_FEATURES``).
(the feature-test macro is not set and the libary is only available when built with ``-D_LIBCPP_ENABLE_EXPERIMENTAL``).
Not yet implemented LWG-issues will cause API and ABI breakage.
.. [#note-P0966] P0966: It was previously erroneously marked as complete in version 8.0. See `bug 45368 <https://llvm.org/PR45368>`__.
.. [#note-P0619] P0619: Only sections D.8, D.9, D.10 and D.13 are implemented. Sections D.4, D.7, D.11, D.12, and D.14 remain undone.

View File

@ -243,6 +243,13 @@ If there are users of this configuration we are happy to provide support.
# define _LIBCPP_ABI_VCRUNTIME
# endif
// Incomplete features get their own specific disabling flags. This makes it
// easier to grep for target specific flags once the feature is complete.
# if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
# define _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
# define _LIBCPP_HAS_NO_INCOMPLETE_RANGES
# endif
// Need to detect which libc we're using if we're on Linux.
# if defined(__linux__)
# include <features.h>

View File

@ -29,8 +29,6 @@
#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION
#cmakedefine _LIBCPP_HAS_NO_WIDE_CHARACTERS
#cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
#cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_RANGES
#cmakedefine01 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT
#cmakedefine _LIBCPP_ENABLE_DEBUG_MODE

View File

@ -131,7 +131,7 @@ namespace std {
#include <__assert> // all public C++ headers provide the assertion handler
// Make sure all feature-test macros are available.
#include <version>
// Enable the contents of the header only when libc++ was built with LIBCXX_ENABLE_INCOMPLETE_FEATURES.
// Enable the contents of the header only when libc++ was built with experimental features enabled.
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
#include <__algorithm/clamp.h>

View File

@ -7,7 +7,7 @@
# Right now, this is done by using the ABI identifier as the filename containing
# the list of symbols exported by libc++ for that configuration, however we could
# make it more sophisticated if the number of ABI-affecting parameters grew.
function(cxx_abi_list_identifier result triple abi_library abi_version unstable exceptions new_delete_in_libcxx debug_mode_enabled allow_incomplete)
function(cxx_abi_list_identifier result triple abi_library abi_version unstable exceptions new_delete_in_libcxx debug_mode_enabled)
set(abi_properties)
if ("${triple}" MATCHES "darwin")
@ -40,11 +40,6 @@ function(cxx_abi_list_identifier result triple abi_library abi_version unstable
else()
list(APPEND abi_properties "nodebug")
endif()
if (${allow_incomplete})
list(APPEND abi_properties "incomplete")
else()
list(APPEND abi_properties "noincomplete")
endif()
list(JOIN abi_properties "." tmp)
set(${result} "${tmp}" PARENT_SCOPE)
@ -68,7 +63,6 @@ cxx_abi_list_identifier(abi_list_identifier
"${LIBCXX_ENABLE_EXCEPTIONS}"
"${LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS}"
"${has_debug_symbols}"
"${LIBCXX_ENABLE_INCOMPLETE_FEATURES}"
)
if (TARGET cxx_shared)

View File

@ -1039,9 +1039,6 @@
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev', 'type': 'FUNC'}
@ -1992,7 +1989,6 @@
{'is_defined': True, 'name': '__ZTINSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}
@ -2187,7 +2183,6 @@
{'is_defined': True, 'name': '__ZTSNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}
@ -2367,7 +2362,6 @@
{'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}

View File

@ -370,9 +370,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@ -902,7 +899,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112format_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
@ -959,7 +955,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112format_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
@ -1019,7 +1014,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112format_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}

View File

@ -370,9 +370,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112format_errorD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@ -902,7 +899,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112format_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
@ -959,7 +955,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112format_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
@ -1019,7 +1014,6 @@
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112format_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
{'import_export': 'EXP', 'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}

View File

@ -1039,9 +1039,6 @@
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112format_errorD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev', 'type': 'FUNC'}
@ -2001,7 +1998,6 @@
{'is_defined': True, 'name': '__ZTINSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}
@ -2211,7 +2207,6 @@
{'is_defined': True, 'name': '__ZTSNSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}
@ -2397,7 +2392,6 @@
{'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'}
{'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'}

View File

@ -708,9 +708,6 @@
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'type': 'FUNC'}
@ -1635,7 +1632,6 @@
{'is_defined': True, 'name': '_ZTINSt3__112codecvt_baseE', 'size': 16, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112format_errorE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'size': 24, 'type': 'OBJECT'}
@ -1764,7 +1760,6 @@
{'is_defined': True, 'name': '_ZTSNSt3__112codecvt_baseE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'size': 26, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'size': 26, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112format_errorE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'size': 23, 'type': 'OBJECT'}
@ -1897,7 +1892,6 @@
{'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'size': 104, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'size': 136, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112format_errorE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'size': 128, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'size': 40, 'type': 'OBJECT'}

View File

@ -702,9 +702,6 @@
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD0Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD1Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112format_errorD2Ev', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'type': 'FUNC'}
@ -1640,7 +1637,6 @@
{'is_defined': True, 'name': '_ZTINSt3__112codecvt_baseE', 'size': 16, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112format_errorE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'size': 24, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'size': 24, 'type': 'OBJECT'}
@ -1770,7 +1766,6 @@
{'is_defined': True, 'name': '_ZTSNSt3__112codecvt_baseE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'size': 26, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'size': 26, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112format_errorE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'size': 23, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'size': 23, 'type': 'OBJECT'}
@ -1904,7 +1899,6 @@
{'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'size': 104, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'size': 136, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112format_errorE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'size': 40, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'size': 128, 'type': 'OBJECT'}
{'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'size': 40, 'type': 'OBJECT'}

View File

@ -89,12 +89,6 @@ if (LIBCXX_ENABLE_LOCALIZATION)
)
endif()
if(LIBCXX_ENABLE_INCOMPLETE_FEATURES)
list(APPEND LIBCXX_SOURCES
format.cpp
)
endif()
if(WIN32)
list(APPEND LIBCXX_SOURCES
support/win32/locale_win32.cpp
@ -317,6 +311,7 @@ add_custom_target(cxx DEPENDS ${LIBCXX_BUILD_TARGETS})
set(LIBCXX_EXPERIMENTAL_SOURCES
experimental/memory_resource.cpp
format.cpp
)
add_library(cxx_experimental STATIC ${LIBCXX_EXPERIMENTAL_SOURCES})
@ -339,6 +334,7 @@ set_target_properties(cxx_experimental
OUTPUT_NAME "c++experimental"
)
cxx_add_common_build_flags(cxx_experimental)
target_compile_options(cxx_experimental PUBLIC -D_LIBCPP_ENABLE_EXPERIMENTAL)
if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)

View File

@ -10,6 +10,7 @@
// REQUIRES: has-unix-headers
// UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-has-no-incomplete-ranges
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
#include <algorithm>

View File

@ -8,6 +8,7 @@
// REQUIRES: has-unix-headers
// UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-has-no-incomplete-ranges
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
// <algorithm>

View File

@ -412,6 +412,9 @@ apple-system-backdeployment-*)
PARAMS+=";abi_runtime_root=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
PARAMS+=";unwind_runtime_root=${OSX_ROOTS}/macOS/libunwind/${DEPLOYMENT_TARGET}"
PARAMS+=";use_system_cxx_lib=True"
# TODO: Enable experimental features during back-deployment -- right now some of the availability
# annotations are incorrect, leading to test failures that could be avoided.
PARAMS+=";enable_experimental=False"
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \
-DLIBCXX_TEST_CONFIG="apple-libc++-backdeployment.cfg.in" \

View File

@ -188,8 +188,6 @@ macros = {
'_LIBCPP_HAS_NO_RANDOM_DEVICE': 'no-random-device',
'_LIBCPP_HAS_NO_LOCALIZATION': 'no-localization',
'_LIBCPP_HAS_NO_WIDE_CHARACTERS': 'no-wide-characters',
'_LIBCPP_HAS_NO_INCOMPLETE_FORMAT': 'libcpp-has-no-incomplete-format',
'_LIBCPP_HAS_NO_INCOMPLETE_RANGES': 'libcpp-has-no-incomplete-ranges',
'_LIBCPP_HAS_NO_UNICODE': 'libcpp-has-no-unicode',
'_LIBCPP_ENABLE_DEBUG_MODE': 'libcpp-has-debug-mode',
}

View File

@ -160,7 +160,7 @@ DEFAULT_PARAMETERS = [
Parameter(name='enable_experimental', choices=[True, False], type=bool, default=True,
help="Whether to enable tests for experimental C++ Library features.",
actions=lambda experimental: [] if not experimental else [
actions=lambda experimental: [
# When linking in MSVC mode via the Clang driver, a -l<foo>
# maps to <foo>.lib, so we need to use -llibc++experimental here
# to make it link against the static libc++experimental.lib.
@ -172,6 +172,9 @@ DEFAULT_PARAMETERS = [
AddFeature('c++experimental'),
PrependLinkFlag(lambda cfg: '-llibc++experimental' if _isMSVC(cfg) else '-lc++experimental'),
AddCompileFlag('-D_LIBCPP_ENABLE_EXPERIMENTAL'),
] if experimental else [
AddFeature('libcpp-has-no-incomplete-format'),
AddFeature('libcpp-has-no-incomplete-ranges')
]),
Parameter(name='long_tests', choices=[True, False], type=bool, default=True,