You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
set(LIBCXX_ABI_VERSION "1"CACHESTRING"ABI version of libc++. Can be either 1 or 2, where 2 is currently not stable. Defaults to 1.")
183
-
set(LIBCXX_ABI_NAMESPACE ""CACHESTRING"The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
184
-
option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++."OFF)
182
+
option(LIBCXX_ABI_UNSTABLE "Use the unstable ABI of libc++. This is equivalent to specifying LIBCXX_ABI_VERSION=n, where n is the not-yet-stable version."OFF)
183
+
if (LIBCXX_ABI_UNSTABLE)
184
+
set(abi_version "2")
185
+
else()
186
+
set(abi_version "1")
187
+
endif()
188
+
set(LIBCXX_ABI_VERSION "${abi_version}"CACHESTRING"ABI version of libc++. Can be either 1 or 2, where 2 is currently the unstable ABI. Defaults to 1 unless LIBCXX_ABI_UNSTABLE is specified, in which case this is 2.")
189
+
set(LIBCXX_ABI_NAMESPACE "__${LIBCXX_ABI_VERSION}"CACHESTRING"The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
190
+
if (NOT LIBCXX_ABI_NAMESPACE MATCHES"__.*")
191
+
message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE must be a reserved identifier.")
192
+
endif()
185
193
option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
186
194
option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
0 commit comments