# HG changeset patch
# Node ID 80b31c312ccb
# Parent  9c9e6967bf96
diff --git a/gplugin-gtk4/meson.build b/gplugin-gtk4/meson.build
--- a/gplugin-gtk4/meson.build
+++ b/gplugin-gtk4/meson.build
@@ -98,6 +98,7 @@ gplugin_gtk4 = library('gplugin-gtk4',
 	GPLUGIN_GTK4_PUBLIC_BUILT_HEADERS,
 	gplugin_gtk4_resources,
 	c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Gtk"'],
+	gnu_symbol_visibility : 'hidden',
 	include_directories : [toplevel_inc, gplugin_gtk4_inc],
 	dependencies : [gplugin_dep, GTK4],
 	version : GPLUGIN_GTK4_LIBRARY_VERSION,
diff --git a/gplugin-introspection/meson.build b/gplugin-introspection/meson.build
--- a/gplugin-introspection/meson.build
+++ b/gplugin-introspection/meson.build
@@ -17,6 +17,7 @@ gplugin_introspection_inc = include_dire
 gplugin_introspection = static_library(
 	'gplugin-introspection',
 	sources : SOURCES + HEADERS,
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GIO, GLIB, GOBJECT, GOBJECT_INTROSPECTION],
 	install : true,
 )
diff --git a/gplugin/meson.build b/gplugin/meson.build
--- a/gplugin/meson.build
+++ b/gplugin/meson.build
@@ -78,6 +78,8 @@ ENUM_HEADERS = [
 enums = gnome.mkenums_simple(
 	'gplugin-enums',
 	sources : ENUM_HEADERS,
+	decorator : '_GPLUGIN_EXTERN',
+	header_prefix : '#include "gplugin-version.h"',
 	install_header : true,
 	install_dir : get_option('includedir') / 'gplugin-1.0' / 'gplugin')
 
@@ -161,6 +163,7 @@ gplugin = library('gplugin',
 	gplugin_h,
 	gplugin_native_h,
 	c_args : ['-DGPLUGIN_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin"'],
+	gnu_symbol_visibility : 'hidden',
 	include_directories : toplevel_inc,
 	dependencies : [GLIB, GOBJECT, GMODULE],
 	version : GPLUGIN_LIBRARY_VERSION,
diff --git a/gplugin/tests/auto-load-fail/meson.build b/gplugin/tests/auto-load-fail/meson.build
--- a/gplugin/tests/auto-load-fail/meson.build
+++ b/gplugin/tests/auto-load-fail/meson.build
@@ -1,5 +1,6 @@
 plugin = shared_library('auto-load-fail', 'auto-load-fail.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 all_native_test_plugins += {'auto-load-fail': plugin}
diff --git a/gplugin/tests/auto-load-pass/meson.build b/gplugin/tests/auto-load-pass/meson.build
--- a/gplugin/tests/auto-load-pass/meson.build
+++ b/gplugin/tests/auto-load-pass/meson.build
@@ -1,5 +1,6 @@
 plugin = shared_library('auto-load-pass', 'auto-load-pass.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 all_native_test_plugins += {'auto-load-pass': plugin}
diff --git a/gplugin/tests/bad-plugins/meson.build b/gplugin/tests/bad-plugins/meson.build
--- a/gplugin/tests/bad-plugins/meson.build
+++ b/gplugin/tests/bad-plugins/meson.build
@@ -1,5 +1,6 @@
 plugin = shared_library('query-error', 'query-error.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 all_native_test_plugins += {'bad-plugins': plugin}
diff --git a/gplugin/tests/bind-global/meson.build b/gplugin/tests/bind-global/meson.build
--- a/gplugin/tests/bind-global/meson.build
+++ b/gplugin/tests/bind-global/meson.build
@@ -1,5 +1,6 @@
 plugin = shared_library('bind-global', 'bind-global.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 all_native_test_plugins += {'bind-global': plugin}
diff --git a/gplugin/tests/dynamic-type/dynamic-test.h b/gplugin/tests/dynamic-type/dynamic-test.h
--- a/gplugin/tests/dynamic-type/dynamic-test.h
+++ b/gplugin/tests/dynamic-type/dynamic-test.h
@@ -22,7 +22,15 @@
 #include <glib.h>
 #include <glib-object.h>
 
+#ifdef DYNAMIC_TEST_COMPILATION
+#define DYNAMIC_EXTERN G_MODULE_EXPORT
+#else
+#define DYNAMIC_EXTERN G_MODULE_IMPORT
+#endif
+
 #define DYNAMIC_TYPE_TEST (dynamic_test_get_type())
+
+DYNAMIC_EXTERN
 G_DECLARE_FINAL_TYPE(DynamicTest, dynamic_test, DYNAMIC, TEST, GObject)
 
 struct _DynamicTest {
diff --git a/gplugin/tests/dynamic-type/meson.build b/gplugin/tests/dynamic-type/meson.build
--- a/gplugin/tests/dynamic-type/meson.build
+++ b/gplugin/tests/dynamic-type/meson.build
@@ -3,6 +3,8 @@ if host_machine.system() != 'windows'
 dynamic_type_provider = shared_library('dynamic-type-provider',
 	'dynamic-type-provider.c',
 	name_prefix : '',
+	c_args : ['-DDYNAMIC_TEST_COMPILATION'],
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 dynamic_type_user = shared_module('dynamic-type-user', 'dynamic-type-user.c',
diff --git a/gplugin/tests/id-collision/meson.build b/gplugin/tests/id-collision/meson.build
--- a/gplugin/tests/id-collision/meson.build
+++ b/gplugin/tests/id-collision/meson.build
@@ -1,9 +1,11 @@
 plugin1 = shared_library('id-collision1', 'id-collision1.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 plugin2 = shared_library('id-collision2', 'id-collision2.c',
 	name_prefix : '',
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [gplugin_dep, GLIB])
 
 all_native_test_plugins += {'id-collision': [plugin1, plugin2]}
diff --git a/gplugin/tests/plugins/meson.build b/gplugin/tests/plugins/meson.build
--- a/gplugin/tests/plugins/meson.build
+++ b/gplugin/tests/plugins/meson.build
@@ -12,6 +12,7 @@ plugins = []
 foreach lib : LIBRARIES
 	plugins += shared_library(lib, f'@lib@.c',
 	                          name_prefix: '',
+	                          gnu_symbol_visibility : 'hidden',
 	                          dependencies : [gplugin_dep, GLIB])
 endforeach
 
diff --git a/gplugin/tests/plugins/settings/meson.build b/gplugin/tests/plugins/settings/meson.build
--- a/gplugin/tests/plugins/settings/meson.build
+++ b/gplugin/tests/plugins/settings/meson.build
@@ -1,5 +1,7 @@
 shared_library('settings', 'settings.c',
-               name_prefix: '', dependencies : [gplugin_dep, GLIB])
+               name_prefix: '',
+               gnu_symbol_visibility : 'hidden',
+               dependencies : [gplugin_dep, GLIB])
 devenv.append('GPLUGIN_PLUGIN_PATH', meson.current_build_dir())
 
 settings_schemas = [
diff --git a/gplugin/tests/versioned-dependencies/meson.build b/gplugin/tests/versioned-dependencies/meson.build
--- a/gplugin/tests/versioned-dependencies/meson.build
+++ b/gplugin/tests/versioned-dependencies/meson.build
@@ -16,6 +16,7 @@ plugins = []
 foreach lib : LIBRARIES
 	plugins += shared_library(lib, f'@lib@.c',
 	                          name_prefix: '',
+	                          gnu_symbol_visibility : 'hidden',
 	                          dependencies : [gplugin_dep, GLIB])
 endforeach
 
diff --git a/lua/meson.build b/lua/meson.build
--- a/lua/meson.build
+++ b/lua/meson.build
@@ -61,6 +61,7 @@ gplugin_lua = shared_library('gplugin-lu
 	GPLUGIN_LUA_HEADERS,
 	name_prefix : '',
 	c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Lua"'],
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [LUA, gplugin_dep],
 	install : true,
 	install_dir : get_option('libdir') / 'gplugin'
diff --git a/python3/meson.build b/python3/meson.build
--- a/python3/meson.build
+++ b/python3/meson.build
@@ -66,6 +66,7 @@ gplugin_python3 = shared_library('gplugi
 	GPLUGIN_PYTHON3_HEADERS,
 	name_prefix : '',
 	c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Python3"'],
+	gnu_symbol_visibility : 'hidden',
 	dependencies : [PYTHON3, PYGOBJECT, gplugin_dep],
 	install : true,
 	install_dir : get_option('libdir') / 'gplugin'
diff --git a/vala/tests/genie-plugins/meson.build b/vala/tests/genie-plugins/meson.build
--- a/vala/tests/genie-plugins/meson.build
+++ b/vala/tests/genie-plugins/meson.build
@@ -11,6 +11,7 @@ all_genie_test_plugins = []
 foreach lib : LIBRARIES
 	plugin = shared_library(f'genie-@lib@-plugin', f'@lib@.gs',
 	                        name_prefix: '',
+	                        gnu_symbol_visibility : 'hidden',
 	                        dependencies : [gplugin_dep, gplugin_vapi])
 	all_genie_test_plugins += plugin
 endforeach
diff --git a/vala/tests/plugins/meson.build b/vala/tests/plugins/meson.build
--- a/vala/tests/plugins/meson.build
+++ b/vala/tests/plugins/meson.build
@@ -11,6 +11,7 @@ all_vala_test_plugins = []
 foreach lib : LIBRARIES
 	plugin = shared_library(f'vala-@lib@-plugin', f'@lib@.vala',
 	                        name_prefix: '',
+	                        gnu_symbol_visibility : 'hidden',
 	                        dependencies: [gplugin_dep, gplugin_vapi])
 	all_vala_test_plugins += plugin
 endforeach
