[cfe-dev] Clang, AppleClang and hidden visibility issues in C++ libraries

Steven Wu via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 13 15:27:50 PST 2018


From the bug report you filed, it is the correct behavior. This is exactly what hidden visibility suppose to do.
For example, the symbol you point out in the bug report:
000000000001bdc0 T __ZN5KCDDB5Sites8siteListEv
vs.
000000000001bc80 t __ZN5KCDDB5Sites8siteListEv

This symbol is from sites.cpp. When you link libKF5Cddb.dylib, linker will hide the symbol so it is no longer an interface available from the dylib (aka. hidden). One easy workaround will be using static library and generate only one dylib. You can also carefully audit all the interface needs to be shared between dylibs with __attribute__((visibility("default"))).

Steven

> On Nov 13, 2018, at 3:00 PM, René J. V. Bertin via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Dimitry Andric via cfe-dev wrote:
> 
>> Do you have any more concrete details, such as the exact error messages, and
> 
> Hope this helps:
> 
> https://bugs.kde.org/show_bug.cgi?id=401018
> 
> R.
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list