-fvisibility=hidden
David Woodhouse
dwmw2 at infradead.org
Fri Apr 22 07:27:22 PDT 2016
On Fri, 2016-04-22 at 14:47 +0200, Milan Crha wrote:
> Hi,
> I was thinking about the -fvisibility=hidden being added
> to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. This kind of thing makes the
> sources overcrowded with defines like LIBICAL_ICAL_EXPORT, which is
> not
> fully necessary. What do you think of:
> a) using CMAKE_<LANG>_VISIBILITY_PRESET instead - looks like
> a cleaner way, but even better:
> b) use for the GCC a regexp for the symbols to export,
> which was done in the evolution-data-server quite some time
> ago; it feels better, doesn't need any special code handling,
> and as long as the API has some common prefix is transparent,
> thus sort of fool-proof. The way the evolution-data-server
> uses is to add an argument to LDFLAGS (autotools speaking):
> -export-symbols-regex "^e_.*"
> which exports only symbols which start with "e_"
c) use a version script.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20160422/9d631eb9/attachment.bin>
More information about the libical-devel
mailing list