From ac1f66a35bbc4fac8e9ffa1206d472bcfd5f159b Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 13 Mar 2019 12:52:25 +0800 Subject: [PATCH] gdk/meson.build: Force-export gdk_win32_display_manager_get_type() ...on Visual Studio builds, as it seems that the linker is optimizing that symbol out (hence it is not exported in the DLL). This is to ensure that the introspection files for GdkWin32 build. --- gdk/meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gdk/meson.build b/gdk/meson.build index dfe91ef16e..8d296a6343 100644 --- a/gdk/meson.build +++ b/gdk/meson.build @@ -258,6 +258,14 @@ if gdk_backends.length() == 0 error('No backends enabled') endif +gdk_link_args = common_ldflags + +# Somehow gdk_win32_display_manager_get_type is not being exported as it +# seems that it was optimized out by the MSVC linker. Force-export it here. +if cc.get_id() == 'msvc' + gdk_link_args += [ '-export:gdk_win32_display_manager_get_type' ] +endif + libgdk = shared_library('gdk-3', sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig], dependencies: gdk_deps, @@ -267,7 +275,7 @@ libgdk = shared_library('gdk-3', '-DG_LOG_DOMAIN="Gdk"', ] + common_cflags, link_whole: gdk_backends, - link_args: common_ldflags, + link_args: gdk_link_args, darwin_versions : gtk_osxversions, install: true)