diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2022-06-30 11:57:52 -0400 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2022-07-19 10:50:20 -0400 |
commit | 8711fcae276a59345506f585a29db8e2b07f8d21 (patch) | |
tree | d973a4e0fb66904c3476dcd66bcce0f606bae5e0 /libcxx/docs | |
parent | 7300a651f5f3b43f9fa3a2d9927322b0e061fcb2 (diff) | |
download | llvm-8711fcae276a59345506f585a29db8e2b07f8d21.zip llvm-8711fcae276a59345506f585a29db8e2b07f8d21.tar.gz llvm-8711fcae276a59345506f585a29db8e2b07f8d21.tar.bz2 |
[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
Diffstat (limited to 'libcxx/docs')
-rw-r--r-- | libcxx/docs/BuildingLibcxx.rst | 9 | ||||
-rw-r--r-- | libcxx/docs/Contributing.rst | 94 | ||||
-rw-r--r-- | libcxx/docs/Status/Cxx20.rst | 2 |
3 files changed, 1 insertions, 104 deletions
diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst index 7c347c6..f365aac 100644 --- a/libcxx/docs/BuildingLibcxx.rst +++ b/libcxx/docs/BuildingLibcxx.rst @@ -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}`` diff --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst index 9806f9b..15c75e8 100644 --- a/libcxx/docs/Contributing.rst +++ b/libcxx/docs/Contributing.rst @@ -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. diff --git a/libcxx/docs/Status/Cxx20.rst b/libcxx/docs/Status/Cxx20.rst index e1a3c70..742d91a 100644 --- a/libcxx/docs/Status/Cxx20.rst +++ b/libcxx/docs/Status/Cxx20.rst @@ -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. |