[libc++] Take advantage of -fexperimental-library in libc++
When -fexperimental-library is passed, libc++ will now pick up the
appropriate __has_feature flag defined by Clang to enable the
experimental library features.
As a fly-by, also update the documentation for the various TSes.
Differential Revision: https://reviews.llvm.org/D130176
NOKEYCHECK=True
GitOrigin-RevId: deb3b5552f04656dee27067b2cc68c906012cfe4
diff --git a/docs/UsingLibcxx.rst b/docs/UsingLibcxx.rst
index 47cbe2d..aa58120 100644
--- a/docs/UsingLibcxx.rst
+++ b/docs/UsingLibcxx.rst
@@ -41,12 +41,10 @@
are either Technical Specifications (TSes) or official features that were voted to
the Standard but whose implementation is not complete or stable yet in libc++. Those
are disabled by default because they are neither API nor ABI stable. However, the
-``_LIBCPP_ENABLE_EXPERIMENTAL`` macro can be defined to turn those features on. Note
-that you will also need to link to the appropriate ``libc++experimental.a`` static
-archive.
+``-fexperimental-library`` compiler flag can be defined to turn those features on.
.. warning::
- Experimental libraries are Experimental.
+ Experimental libraries are experimental.
* The contents of the ``<experimental/...>`` headers and the associated static
library will not remain compatible between versions.
* No guarantees of API or ABI stability are provided.
@@ -54,6 +52,12 @@
the experimental feature is removed two releases after the non-experimental
version has shipped. The full policy is explained :ref:`here <experimental features>`.
+.. note::
+ On compilers that do not support the ``-fexperimental-library`` flag, users can
+ define the ``_LIBCPP_ENABLE_EXPERIMENTAL`` macro and manually link against the
+ appropriate static library (usually shipped as ``libc++experimental.a``) to get
+ access to experimental library features.
+
Using libc++ when it is not the system default
==============================================