[PATCH] D55404: [libcxx] Support building static library with hidden visibility

Louis Dionne via Phabricator reviews at reviews.llvm.org
Fri Dec 21 14:34:52 PST 2018


ldionne added a comment.

In D55404#1339724 <https://reviews.llvm.org/D55404#1339724>, @phosek wrote:

> In D55404#1337691 <https://reviews.llvm.org/D55404#1337691>, @ldionne wrote:
>
> > Yes, I think something along the lines of `LIBCXX_HERMETIC_STATIC_LIBRARY` would be better, along with some documentation for what this means and what the intent is.
>
>
> Done, I've also updated the documentation.
>
> > I don't understand this -- I don't think we'd export new and delete if they are not part of the export list, no? I would think that you could build normally (without any flags) and just use an empty list of exported symbols?
>
> They would be exported because they're defined by the compiler which uses default visibility by default. I tried it locally and it's the case without the `-fvisibility-global-new-delete-hidden` option.


Well.. We'd also have to provide an explicit list of symbols that should _not_ be exported from the dylib (there's probably a linker option for that). Meh


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D55404





More information about the libcxx-commits mailing list