[libc++] Remove _LIBCPP_ABI_UNSTABLE
Previously, _LIBCPP_ABI_UNSTABLE would be used interchangeably with
_LIBCPP_ABI_VERSION >= 2. This was confusing and creating unnecessary
complexity.
This patch removes _LIBCPP_ABI_UNSTABLE -- instead, the LIBCXX_ABI_UNSTABLE
CMake option will result in the LIBCXX_ABI_VERSION being set to '2', the
current unstable ABI. As a result, in the code, we only have _LIBCPP_ABI_VERSION
to check in order to query the current ABI version.
As a fly-by, this also defines the ABI namespace during CMake configuration
to reduce complexity in __config. I believe it was previously done this
way because we used to try to use __config_site as seldom as possible.
Now that we always ship a __config_site, it doesn't really matter and
I think being explicit about how the library is configured in the __config_site
is actually a feature.
Differential Revision: https://reviews.llvm.org/D119173
NOKEYCHECK=True
GitOrigin-RevId: 817d897b57c7f37d04c2a28153316efe3ae59ada
diff --git a/docs/BuildingLibcxx.rst b/docs/BuildingLibcxx.rst
index b84bf8c..8c0d007 100644
--- a/docs/BuildingLibcxx.rst
+++ b/docs/BuildingLibcxx.rst
@@ -443,10 +443,10 @@
with other libc++ versions.
.. warning::
- When providing a custom namespace, it's the users responsibility to ensure the name won't cause
+ When providing a custom namespace, it's the user's responsibility to ensure the name won't cause
conflicts with other names defined by libc++, both now and in the future. In particular, inline
- namespaces of the form ``__[0-9]+`` are strictly reserved by libc++ and may not be used by users.
- Doing otherwise could cause conflicts and hinder libc++ ABI evolution.
+ namespaces of the form ``__[0-9]+`` could cause conflicts with future versions of the library,
+ and so should be avoided.
.. option:: LIBCXX_ABI_DEFINES:STRING
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 6ad7fe9..9bb06cf 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -41,6 +41,12 @@
API Changes
-----------
+- The ``_LIBCPP_ABI_UNSTABLE`` macro has been removed in favour of setting
+ ``_LIBCPP_ABI_VERSION=2``. This should not have any impact on users because
+ they were not supposed to set ``_LIBCPP_ABI_UNSTABLE`` manually, however we
+ still feel that it is worth mentioning in the release notes in case some users
+ had been doing it.
+
ABI Changes
-----------