[libcxx-commits] [libcxxabi] [libc++abi] Always enable -fvisibility=hidden (PR #207333)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 6 00:35:14 PDT 2026


================
@@ -195,6 +195,7 @@ if (LIBCXXABI_SUPPORTS_SHARED_LIBRARY)
   # Build with -fsized-deallocation, which is default in recent versions of Clang.
   # TODO(LLVM 21): This can be dropped once we only support Clang >= 19.
   target_add_compile_flags_if_supported(cxxabi_shared_objects PRIVATE -fsized-deallocation)
+  target_add_compile_flags_if_supported(cxxabi_shared_objects PRIVATE -fvisibility=hidden)
----------------
philnik777 wrote:

For the record, I've done
```
nm libc++abi.so.1.0 | cut -c 18- > dump.nm
ninja cxxabi-test-depends
nm libc++abi.so.1.0 | cut -c 18- > dump2.nm
diff dump.nm dump2.nm
```
and the files were identical.

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


More information about the libcxx-commits mailing list