GNOME Bugzilla – Bug 773100
Merge libgdk.so into libgtk.so
Last modified: 2016-10-26 14:34:32 UTC
Now that we branched for gtk4 we are free to break ABI, and there really is no particular reason for libgdk.so to be a separate shared library. All that does is cause problems: * No good way to have private APIs in gdk for gtk-only use * No inter-library optimizations, and all gdk calls are slower than internal * More .so:s in the link table, causing slower symbol lookups I'm attaching some initial patches for this. The resulting stripped shared library is 84kb smaller on disk than the original gtk+gdk together. They have some issues though: * The gdk dir files don't refer to any shared library. I guess we should make it refer to the gtk one? Is it even possible to have two girs/typelibs for a single shared library, or do we need to put all the gdk stuff in the gtk gir/typelib? * The win32 build isn't updated * I didn't look at gtk-doc yet
Created attachment 337849 [details] [review] Make gdk.la a noninst helper library This merged gtk and gdk into one library, making it possible to have internal private APIs between gtk and gdk, as well as producing more efficient code.
As said on IRC: Gdk-4.0.gir/typelib should just reference libgtk-4.so. The shared library is the file language bindings have to dlopen in order to call the symbols from within their own trampolines. This means moving Gdk-4.0.gir and .typelib rules into gtk/.
Created attachment 337859 [details] [review] Make gdk.la a noninst helper library This merged gtk and gdk into one library, making it possible to have internal private APIs between gtk and gdk, as well as producing more efficient code.
New version builds gdk/Gdk-4.0-noinstall.gir in gdk/ and has a sed hack to inject the shared library into gtk/Gdk-4.0.gir and we delay building the typelibs until in gtk/ when we have the shared library there.
Merged a version of this