[pacman-dev] [PATCH 3/3] meson: use hidden symbol visiblity by default

Eli Schwartz eschwartz at archlinux.org
Thu Dec 24 01:38:05 UTC 2020


On 12/23/20 5:42 PM, Emil Velikov wrote:
> All the required public API is annotated with SYMEXPORT, so we can just
> add the meson notation, to hide all the symbols by default.
> 
> Thus we no longer spill all the internal API into the global namespace.
Thanks for noticing this... it's a regression from autotools, which 
contained in lib/libalpm/Makefile.am:

if ENABLE_VISIBILITY_CC
if DARWIN
AM_CFLAGS += -fvisibility=hidden
else
AM_CFLAGS += -fvisibility=internal
endif
endif


I wonder if we had a good reason to use "internal" and if we should 
continue to do so? IIUC it makes it slightly more optimized at the cost 
of allowing pointers into private functions (e.g. callbacks) used by 
other programs to segfault.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20201223/3da44b75/attachment.sig>


More information about the pacman-dev mailing list