[libcxx-commits] [PATCH] D153658: [libc++] Make everything in namespace std have default type visibility and hidden visibility and remove _LIBCPP_ENUM_VIS
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 23 19:39:46 PDT 2023
EricWF added inline comments.
================
Comment at: libcxx/docs/ReleaseNotes/18.rst:82
+ ``-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 across binaries. However, if you intend to use libc++ purely as an
----------------
EricWF wrote:
> A lot of this is incorrect.
>
> -fvisibility-hidden is for when your
>
-fvisibility=default causes all symbols to be exported from any dylib they're emitted in (and for templates, that's every TU).
Dynamic cast and friends only matter when you're trying to do it across shared library boundaries, which is very rare. Otherwise having duplicate vtables/type infos isn't a big deal.
Further, I don't understand what ". 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." is actually talking about.
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