[libcxx-commits] [PATCH] D153658: [libc++] Make everything in namespace std have default type visibility and hidden visibility and remove _LIBCPP_ENUM_VIS

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 18 09:04:10 PDT 2023


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

This LGTM with passing CI, updated commit message and the release note.

For most people who compile with `-fvisibility=default` (or nothing at all), this is a no-op since everything in the library already had default visibility. For users who build with `-fvisibility=hidden`, there used to be a bunch of types that we forgot to apply `type_visibility(default)` or `visibility(default)` to, and those would previously be hidden. After this change, their type_visibility would become `default` (as it should) on Clang (but not on GCC).



================
Comment at: libcxx/.clang-format:25
                   '_LIBCPP_CONSTEXPR_SINCE_CXX23',
                   '_LIBCPP_CONSTEXPR',
                   '_LIBCPP_CONSTINIT',
----------------
The commit message needs to be updated!


================
Comment at: libcxx/docs/DesignDocs/VisibilityMacros.rst:3
 Symbol Visibility Macros
 ========================
 
----------------
Release note:

This release of libc++ added missing visibility annotations on some types in the library. Users compiling with `-fvisbility=hidden` may notice that additional type infos from libc++ are being exported from their ABI. This is the correct behavior in almost all cases since exporting the RTTI is required for these types to work properly with `dynamic_cast`, exceptions and other mechanisms. However, if you intend to use libc++ purely as an internal implementation detail (i.e. you use libc++ as a static archive and never export libc++ symbols from your ABI) and you notice changes to your exported symbols list, then this means that you were not properly preventing libc++ symbols from being part of your ABI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153658/new/

https://reviews.llvm.org/D153658



More information about the libcxx-commits mailing list