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

Message ID 20201223224224.1434521-3-emil.l.velikov@gmail.com
State New
Headers show
Series [pacman-dev,1/3] meson: replace objects with link_whole | expand

Commit Message

Emil Velikov Dec. 23, 2020, 10:42 p.m. UTC
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.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 meson.build | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meson.build b/meson.build
index 380564bb..6173f2b7 100644
--- a/meson.build
+++ b/meson.build
@@ -303,6 +303,7 @@  libcommon = static_library(
   'common',
   libcommon_sources,
   include_directories : includes,
+  gnu_symbol_visibility : 'hidden',
   install : false)
 
 alpm_deps = [crypto_provider, libarchive, libcurl, libintl, gpgme]
@@ -312,6 +313,7 @@  libalpm_a = static_library(
   libalpm_sources,
   link_whole: libcommon,
   include_directories : includes,
+  gnu_symbol_visibility : 'hidden',
   dependencies : alpm_deps)
 
 libalpm = library(