[libcxx-commits] [libcxx] [libc++] Introduce implicit and explicit ABI annotations (PR #193045)

Nick Desaulniers via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 14 11:00:49 PDT 2026


nickdesaulniers wrote:

I think support for `visibility` in `#pragma clang attribute` is a relatively new feature, seemingly only since clang-21.
https://godbolt.org/z/dnzqo8c6Y

It appears that this commit introduced a breaking change for tools that use Rust's bindgen  (via  libclang ) to generate bindings for code that includes  libc++  headers.  When running `bindgen` on code that includes standard headers, we encounter the error linked above.

FWICT, this is traced back to the use of  `__visibility__("hidden")`  in  `#pragma clang attribute` in  namespace.h.
 
Do we need a version check or some kind of guard for this pragma?

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


More information about the libcxx-commits mailing list