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

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Nov 23 17:02:18 PST 2024


Author: Louis Dionne
Date: 2024-11-23T20:02:15-05:00
New Revision: afae1a5f32bb16c389b718e91e6eb808e0deeac2

URL: https://github.com/llvm/llvm-project/commit/afae1a5f32bb16c389b718e91e6eb808e0deeac2
DIFF: https://github.com/llvm/llvm-project/commit/afae1a5f32bb16c389b718e91e6eb808e0deeac2.diff

LOG: [libc++] Remove _LIBCPP_DISABLE_AVAILABILITY macro (#112952)

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

Added: 
    

Modified: 
    libcxx/docs/ReleaseNotes/20.rst
    libcxx/include/__configuration/availability.h

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/ReleaseNotes/20.rst b/libcxx/docs/ReleaseNotes/20.rst
index 9039c6f046445b..d520c46bae1ef1 100644
--- a/libcxx/docs/ReleaseNotes/20.rst
+++ b/libcxx/docs/ReleaseNotes/20.rst
@@ -102,6 +102,9 @@ Deprecations and Removals
   headers as an extension and only deprecates them. The ``_LIBCPP_DISABLE_DEPRECATION_WARNINGS`` macro can be defined to
   suppress deprecation for these headers.
 
+- 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 d805c5a4d978d3..efda2a04a4841d 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -67,13 +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)
-#  undef _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
-#  define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0
-#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