[libcxx-commits] [libcxx] [libc++] Remove _LIBCPP_DISABLE_AVAILABILITY macro (PR #112952)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 18 11:23:42 PDT 2024


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/112952

This was slated for removal years ago, so now's a good time to remove it.

>From 17331451b8a227a2b0acb4acd9f06308ce24d5d3 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 18 Oct 2024 14:22:56 -0400
Subject: [PATCH] [libc++] Remove _LIBCPP_DISABLE_AVAILABILITY macro

This was slated for removal years ago, so now's a good time to remove it.
---
 libcxx/docs/ReleaseNotes/20.rst               | 3 +++
 libcxx/include/__configuration/availability.h | 8 --------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/libcxx/docs/ReleaseNotes/20.rst b/libcxx/docs/ReleaseNotes/20.rst
index 44912d2ddafac6..a212921ee1d73c 100644
--- a/libcxx/docs/ReleaseNotes/20.rst
+++ b/libcxx/docs/ReleaseNotes/20.rst
@@ -85,6 +85,9 @@ Deprecations and Removals
 - The function ``__libcpp_verbose_abort()`` is now ``noexcept``, to match ``std::terminate()``. (The combination of
   ``noexcept`` and ``[[noreturn]]`` has special significance for function effects analysis.)
 
+- The ``_LIBCPP_DISABLE_AVAILABILITY`` macro that was used to force-disable availability markup has now been removed.
+  Whether availability markup is used by the library is now solely controlled at configuration-time.
+
 Upcoming Deprecations and Removals
 ----------------------------------
 
diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index f42ff460db4544..8dee132e2b0803 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -67,14 +67,6 @@
 //
 // [1]: https://clang.llvm.org/docs/AttributeReference.html#availability
 
-// For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY
-// for a while.
-#if defined(_LIBCPP_DISABLE_AVAILABILITY)
-#  if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-#    define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
-#  endif
-#endif
-
 // Availability markup is disabled when building the library, or when a non-Clang
 // compiler is used because only Clang supports the necessary attributes.
 #if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || !defined(_LIBCPP_COMPILER_CLANG_BASED)



More information about the libcxx-commits mailing list