-fvisibility=hidden
Milan Crha
mcrha at redhat.com
Fri Apr 22 05:47:32 PDT 2016
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_"
Thoughts?
Bye,
Milan
More information about the libical-devel
mailing list