gio: Use hidden symbol visibility in static libraries

Building GLib 2.75.0 on Linux adds various inotify-related internal
symbols to the ABI, which doesn't seem to have been intentional.
I went through the other libraries in the build system, and it looks
as though the BSD kqueue backend would have the same problem.

GNU symbol visibility probably doesn't do anything for gio/win32, but
for completeness I've set that to use hidden symbols too, on the basis
that it'll be easier to get this right if we're consistent.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2811
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-11-12 19:12:16 +00:00 committed by Philip Withnall
parent 84284521b2
commit c1ee1a99bc
3 changed files with 3 additions and 0 deletions

View File

@ -11,5 +11,6 @@ inotify_lib = static_library('inotify',
sources : inotify_sources,
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep, libglib_dep, libgobject_dep],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])

View File

@ -9,5 +9,6 @@ kqueue_lib = static_library('kqueue',
sources : kqueue_sources,
include_directories : [configinc, glibinc, gmoduleinc],
dependencies : [gioenumtypes_dep],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])

View File

@ -11,5 +11,6 @@ giowin32_lib = static_library('giowin32',
sources : [giowin32_sources],
include_directories : [configinc, glibinc, gioinc, gmoduleinc],
dependencies : [libintl, gioenumtypes_dep],
gnu_symbol_visibility : 'hidden',
pic : true,
c_args : [gio_c_args, gio_c_args_internal])