-fvisibility=hidden
Allen Winter
winter at kde.org
Fri Apr 22 08:04:33 PDT 2016
On Friday, April 22, 2016 02:47:32 PM 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_"
>
You need LIBICAL_ICAL_EXPORT. remember this builds on all platforms, not just unixy ones with gcc
We need a portable way to export only what we need to export.
and I disliked the old way we did it with the separate file of exported symbols (the libfoo.def files)
i like the way it is.
> Thoughts?
> Bye,
> Milan
>
> _______________________________________________
> libical-devel mailing list
> libical-devel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libical-devel
More information about the libical-devel
mailing list