[PATCH] D53868: Build with -fvisibility=hidden

Eric Fiselier via Phabricator reviews at reviews.llvm.org
Tue Oct 30 10:15:25 PDT 2018


EricWF added a comment.

In https://reviews.llvm.org/D53868#1280618, @ldionne wrote:

> I think what I would prefer is a patch that fixes the build with `-fvisiblity=hidden` on Linux using source-level annotations without actually building with `-fvisibility=hidden`. This can be done by using either `_LIBCPP_EXPORTED_FROM_ABI` if the thing should be visible, or mark it as hidden if it shouldn't.


I think we should be moving away from per-function source-level annotations.

> Once this is done and libc++ works properly with inline visibility on Linux and MacOS, we can switch the namespace-scope attribute to make everything hidden _and_ fixup the macros that need to account for the change in default.

After this patch, we can switch to a namespace-scope attribute without anything changing (in terms of export lists). That was part of the goal of this patch: To update the export lists so that they matched what they'll be after the namespace change.


Repository:
  rCXX libc++

https://reviews.llvm.org/D53868





More information about the libcxx-commits mailing list