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

Louis Dionne via Phabricator reviews at reviews.llvm.org
Mon Oct 1 18:39:01 PDT 2018


ldionne added a comment.

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

> In https://reviews.llvm.org/D52662#1251866, @ldionne wrote:
>
> > In https://reviews.llvm.org/D52662#1251857, @smeenai wrote:
> >
> > > Hmm, why do we need to be able to explicitly instantiate vtables and RTTI ... doesn't the implied emission of those in the object file containing the key function work? I've been aware of a few -dev threads flying back and forth about various visibility issues for libc++, and I admit I haven't been keeping up with them fully, so I apologize if this has already been covered in one of those.
> >
> >
> > We'd need to give default visibility to the vtable and the RTTI, which requires using an attribute.
>
>
> Isn't that what `__attribute__((type_visibility("default")))` accomplishes?


The problem is that it requires applying the attribute to the class template itself as opposed to a single instantiation of it.  Unless I am wrong?

Sent from iphone


Repository:
  rCXX libc++

https://reviews.llvm.org/D52662





More information about the libcxx-commits mailing list