meson: add -fvisibility=hidden explicitly to selected targets

Don't use it project-wide for building everything. Otherwise
symbols for shared modules won't be exposed, e.g. in the
resourceplugin used by the gio resource unit test.
This commit is contained in:
Tim-Philipp Müller
2017-02-16 09:52:58 +00:00
committed by Matthias Clasen
parent 1224ff0c39
commit 2f29ee1735
9 changed files with 13 additions and 11 deletions

View File

@@ -4,6 +4,8 @@ gio_c_args = [
'-DGIO_MODULE_DIR="@0@"'.format(glib_giomodulesdir),
]
gio_c_args += glib_hidden_visibility_args
# FIXME: Install empty glib_giomodulesdir
gnetworking_h_conf = configuration_data()
@@ -747,6 +749,7 @@ gio_tool_sources = [
'gio-tool-tree.c',
]
# FIXME: are all these HAVE_CONFIG_H needed/used here?
executable('gio', gio_tool_sources,
install : true,
c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args,

View File

@@ -13,4 +13,4 @@ xdgmime_lib = static_library('xdgmime',
sources : xdgmime_sources,
include_directories : [configinc],
pic : true,
c_args : [ '-DHAVE_CONFIG_H', '-DXDG_PREFIX=_gio_xdg' ])
c_args : [ '-DHAVE_CONFIG_H', '-DXDG_PREFIX=_gio_xdg' ] + glib_hidden_visibility_args)