[libc++] Remove _LIBCPP_ABI_UNSTABLE
authorLouis Dionne <ldionne.2@gmail.com>
Mon, 7 Feb 2022 19:52:17 +0000 (14:52 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Tue, 8 Feb 2022 20:18:09 +0000 (15:18 -0500)
commit817d897b57c7f37d04c2a28153316efe3ae59ada
tree4b2f9b7ca00296af76cf2d8cb6b53589a4f4e87c
parent506cf6dc048835c598b654e43ed8f723a42e39ba
[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
libcxx/CMakeLists.txt
libcxx/docs/BuildingLibcxx.rst
libcxx/docs/ReleaseNotes.rst
libcxx/include/__config
libcxx/include/__config_site.in
libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp
libcxx/utils/gdb/libcxx/printers.py
libcxx/utils/libcxx/test/features.py