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

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 19 05:07:20 PDT 2024


================
@@ -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.
----------------
h-vetinari wrote:

This breaks the setup in our distribution pretty essentially. We always ship an up-to-date libc++, but keep compiling for pretty old deployment targets (currently still on 10.13). The only way to make many current-gen C++ libraries work under those constraints is to disable the availability annotations, which has been how we've been supporting both modern packages AND old hardware ([docs](https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk)). This happens at build time for said library, but at runtime from the POV of the already-compiled libc++.

We currently have >250 [packages](https://github.com/search?q=org%3Aconda-forge%20_LIBCPP_DISABLE_AVAILABILITY&type=code) making use of this. What would be an alternative in a world after this PR? Just define `_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS`?

I realize that we're not a common use-case in and of ourselves, but we do have >2B of monthly [downloads](https://conda-forge.org/) (across all platforms, not just osx), so a relatively big multiplier. We believe that keeping compatibility for as long as feasible is an important quality, and since we've got the infrastructural wherewithal to solve the technical issues, it would be a pity to shut this door.

CC @isuruf @xhochy @beckermr @jakirkham

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


More information about the libcxx-commits mailing list