[gtk/wip/smcv/gtk3-gresource-internal] build: Don't export GResource-related symbols with newer GLib



commit b4d120fcb415f01966c62ce2010c89867e079057
Author: Simon McVittie <smcv debian org>
Date:   Thu Jul 9 16:57:42 2020 +0100

    build: Don't export GResource-related symbols with newer GLib
    
    This makes the desired behaviour explicit, and matches the behaviour
    seen with Meson, where "external : false" is the default.
    
    Before GNOME/glib!1468, not passing --internal to the resource compiler
    meant "no special export attribute, do what you would normally do",
    so these symbols were not exported due to our global use of
    -fvisibility=hidden.
    
    However, since GNOME/glib!1468, not passing --internal to the resource
    compiler results in the symbols being decorated with G_MODULE_EXPORT,
    which overrides -fvisibility=hidden. This was necessary because Windows
    DLLs normally behave a bit like the equivalent of ELF libraries with
    -fvisibility=hidden.
    
    Signed-off-by: Simon McVittie <smcv debian org>
    Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/2919

 gdk/Makefile.am | 4 ++--
 gtk/Makefile.am | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 3635864fef..3f915b6be2 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -491,10 +491,10 @@ resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --gener
 
 gdkresources.h: gdk.gresource.xml
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
-               --sourcedir=$(srcdir) --c-name _gdk --generate-header --manual-register
+               --sourcedir=$(srcdir) --c-name _gdk --generate-header --manual-register --internal
 gdkresources.c: gdk.gresource.xml $(resource_files)
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
-               --sourcedir=$(srcdir) --c-name _gdk --generate-source --manual-register
+               --sourcedir=$(srcdir) --c-name _gdk --generate-source --manual-register --internal
 
 # ------------------- MSVC Build Items ----------------
 MSVCPROJS = gdk-3
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 9559595586..c703024f44 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -1421,10 +1421,10 @@ resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --gener
 
 gtkresources.h: gtk.gresource.xml
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
-               --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header --manual-register
+               --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-header --manual-register --internal
 gtkresources.c: gtk.gresource.xml $(resource_files)
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
-               --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source --manual-register
+               --target=$@ --sourcedir=$(srcdir) --c-name _gtk --generate-source --manual-register --internal
 
 gtkprivatetypebuiltins.h: stamp-gtkprivatetypebuiltins.h
        @true


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]