[libcxx] r196411 - Give all members of exception types default visibility. Lack of this is causing some illegal code relocations rare and hard to reproduce cases.

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 15:53:29 PST 2016

> On 2016-Jan-11, at 15:40, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> On 8 January 2016 at 19:50, Duncan P. N. Exon Smith via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
>> [re-send to lists.llvm.org]
>> [necromancy]
>> This is causing some strangeness for users of libc++ headers that
>> ship dylibs and build with -fno-rtti and -fvisibility=hidden.
>> Strangely, -fno-rtti does *not* imply -fno-exceptions; the type info
>> needed for exceptions is generated on-the-fly.  This means that each
>> translation unit generates a linkonce_odr copy of the std::exception
>> type info -- weird, but kind of reasonable?
> Will gcc produce a copy too? It seems really strange to produce
> different linkages for -frtti and -fno-rtti -fexcptions.

I'm not sure about GCC.  Note that there is no linkage for -frtti,
since the type info is deferred to the TU with the vtable.

More information about the cfe-commits mailing list