[libcxx-commits] [libcxx] [libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (PR #131156)

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 27 15:48:40 PDT 2025


petrhosek wrote:

We see another issue with this patch when using libc++ with GCC:
```
../../zircon/kernel/lib/ktl/include/cstdlib:26: error: ignoring '#pragma clang attribute' [-Werror=unknown-pragmas]
   26 | _LIBCPP_BEGIN_NAMESPACE_STD
../../zircon/kernel/lib/ktl/include/cstdlib:30: error: ignoring '#pragma clang attribute' [-Werror=unknown-pragmas]
   30 | _LIBCPP_END_NAMESPACE_STD
```
I believe the issue is that `_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS` uses `pragma clang` unconditionally.

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


More information about the libcxx-commits mailing list