From 25ec19723ce216b0322cecfc0292af73c4a3bffc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 19 Jan 2024 11:32:44 +0000 Subject: [PATCH] girepository: Exclude private symbols from the ABI This removes the gthash utility functions from the ABI, so link those into their automated test statically. Signed-off-by: Simon McVittie --- girepository/cmph/meson.build | 1 + girepository/meson.build | 2 ++ girepository/tests/meson.build | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/girepository/cmph/meson.build b/girepository/cmph/meson.build index 816294500..88f977b66 100644 --- a/girepository/cmph/meson.build +++ b/girepository/cmph/meson.build @@ -51,6 +51,7 @@ cmph = static_library('cmph', sources: cmph_sources, c_args: custom_c_args, dependencies: cmph_deps, + gnu_symbol_visibility : 'hidden', ) cmph_dep = declare_dependency( diff --git a/girepository/meson.build b/girepository/meson.build index f6086305a..6c0a1f8f6 100644 --- a/girepository/meson.build +++ b/girepository/meson.build @@ -106,6 +106,7 @@ girepo_gthash_lib = static_library('girepository-gthash', libgmodule_dep, libgobject_dep, ], + gnu_symbol_visibility : 'hidden', ) girepo_gthash_dep = declare_dependency( @@ -132,6 +133,7 @@ libgirepository_internals = static_library('girepository-internals', gi_visibility_h, ], c_args: gir_c_args + custom_c_args, + gnu_symbol_visibility : 'hidden', include_directories : [configinc, girepoinc], dependencies: [girepo_gthash_dep, libffi_dep], ) diff --git a/girepository/tests/meson.build b/girepository/tests/meson.build index be560d2ad..df224656b 100644 --- a/girepository/tests/meson.build +++ b/girepository/tests/meson.build @@ -6,7 +6,9 @@ if enable_gir 'cmph-bdz': { 'dependencies': [cmph_dep], }, - 'gthash' : {}, + 'gthash' : { + 'dependencies': [girepo_gthash_dep], + }, 'repository' : { 'depends': [glib_gir, gobject_gir], },