[PATCH] D52662: [libc++] Make sure we can build libc++ with -fvisibility=hidden

Louis Dionne via Phabricator reviews at reviews.llvm.org
Fri Sep 28 15:02:38 PDT 2018


ldionne added a comment.

In https://reviews.llvm.org/D52662#1249649, @smeenai wrote:

> That makes sense. Back when I was looking into this (which is over a year ago now, and sadly I got pulled away into other things before I had a chance to upstream all of it), I found that only some of the missing exports when building with hidden visibility were actually required for `check-cxx` to pass. The rest could be added if you want to preserve ABI compatibility for v1, but hidden visibility very much seems like an ABI v2 thing, so at that point you could also fix the over-exporting.


I think this is applicable for ABI v1: those symbols are currently exported by the ABI, and it is just a coincidence that we export them from the dylib.

> Internally, we've been building libc++ with hidden visibility for a long time now, and it's been working well. I'm linking some of the issues from when I was working on that; I've lost all context on these by now, but I figured it might save you some trouble if you ran into similar issues:

Why have you been building libc++ with hidden visibility? What is the advantage of doing that?

> https://bugs.llvm.org/show_bug.cgi?id=32114
>  https://bugs.llvm.org/show_bug.cgi?id=34614
>  https://github.com/smeenai/bad-visibility-finder

Thanks for the links!


Repository:
  rCXX libc++

https://reviews.llvm.org/D52662





More information about the libcxx-commits mailing list