diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 42371cc80..d8c0a7661 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -774,7 +774,7 @@ if not meson.is_cross_build() resource_plugin += shared_module('resourceplugin', sources: ['resourceplugin.c', plugin_resources_c], - c_args : export_dynamic_cflags, + link_args : export_dynamic_ldflags, dependencies : common_gio_tests_deps, install_dir : installed_tests_execdir, install_tag : 'tests', diff --git a/gmodule/meson.build b/gmodule/meson.build index f7b41536e..da4d06cfb 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -115,24 +115,22 @@ pkg.generate(libgmodule, description : 'Dynamic module loader for GLib', ) -pkg.generate(libraries : [libgmodule], +pkg.generate(libraries : [libgmodule, export_dynamic_ldflags], requires : ['glib-2.0'], version : glib_version, variables : [supported_var], install_dir : glib_pkgconfigreldir, filebase : 'gmodule-export-2.0', - extra_cflags : export_dynamic_cflags, name : 'GModule', description : 'Dynamic module loader for GLib', ) -pkg.generate(libraries : [libgmodule], +pkg.generate(libraries : [libgmodule, export_dynamic_ldflags], requires : ['glib-2.0'], version : glib_version, variables : [supported_var], install_dir : glib_pkgconfigreldir, filebase : 'gmodule-2.0', - extra_cflags : export_dynamic_cflags, name : 'GModule', description : 'Dynamic module loader for GLib', ) diff --git a/meson.build b/meson.build index 1041dfe0d..be5be25ed 100644 --- a/meson.build +++ b/meson.build @@ -2334,15 +2334,15 @@ if host_system == 'windows' # Autotools explicitly removed --Wl,--export-all-symbols from windows builds, # with no explanation. Do the same here for now but this could be revisited if # if causes issues. - export_dynamic_cflags = [] + export_dynamic_ldflags = [] elif host_system == 'cygwin' - export_dynamic_cflags = ['-Wl,--export-all-symbols'] + export_dynamic_ldflags = ['-Wl,--export-all-symbols'] elif host_system in ['darwin', 'ios'] - export_dynamic_cflags = [] + export_dynamic_ldflags = [] elif host_system == 'sunos' - export_dynamic_cflags = [] + export_dynamic_ldflags = [] else - export_dynamic_cflags = ['-Wl,--export-dynamic'] + export_dynamic_ldflags = ['-Wl,--export-dynamic'] endif win32_cflags = []