[libcxx-commits] [PATCH] D147832: [libcxx] Introduce clang::lto_visibility_public attribute
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 13 14:29:01 PDT 2023
ldionne added a comment.
After careful consideration, I am left wondering why `-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -fvisibility=hidden` even makes sense. I understand that you want to minimize the number of symbols exported from your program and I think that's a desirable goal. However, let's say you take a typical program and just compile it normally without using `-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -fvisibility=hidden` -- what's the problem? What symbols end up being exported that you wouldn't want to export?
We already mark the vast majority of symbols in libc++ as hidden (using `_LIBCPP_HIDE_FROM_ABI`), and the ones that are not marked as hidden basically need to be public for correctness purposes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147832/new/
https://reviews.llvm.org/D147832
More information about the libcxx-commits
mailing list