How is symbol visibility set in KF5 and KDE?

Kevin Funk kfunk at kde.org
Wed Nov 15 16:19:37 GMT 2017


On Wednesday, 15 November 2017 15:54:17 CET Shaheed Haque wrote:
> Hi all,
> 
> I just realised that the Python binding effort is not setting the default
> visibility for symbols using the -fvisibility=xxx option when processing
> the header files [1]. Of course I can see the export macros set by the
> likes of attica_exports.h, but I don't see where the compiler default is
> set. Can somebody kindly point that out?

It's configured in extra-cmake-modules.git:

kde-modules/KDECompilerSettings.cmake
223:set(CMAKE_C_VISIBILITY_PRESET hidden)
224:set(CMAKE_CXX_VISIBILITY_PRESET hidden)
225:set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

Regards,
Kevin

> Thanks, Shaheed
> 
> [1] I'm also a bit mystified by the fact that I am deliberately querying
> CMake for the COMPILE_FLAGS to use, but I have not seen -fvisibility
> anywhere...


-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20171115/953462fd/attachment.sig>


More information about the kde-core-devel mailing list