gdk: Enable unity builds

Instruct meson to compile all gsk sources in one pass. This lets
the compiler inline freely between our sources, and is much nicer
than moving functions into the headers as static inlines.
This commit is contained in:
Matthias Clasen 2024-09-09 09:57:47 -04:00
parent 157e60247f
commit 1ffd8eccee

View File

@ -293,11 +293,14 @@ if gdk_backends.length() == 0
endif
libgdk = static_library('gdk',
override_options: [ 'unity=on', 'unity_size=10000' ],
sources: [gdk_sources, gdk_backends_gen_headers, gdk_gen_headers],
dependencies: gdk_deps + [libgtk_css_dep],
link_with: [libgtk_css],
include_directories: [confinc, gdkx11_inc, wlinc],
c_args: libgdk_c_args + common_cflags,
c_args: libgdk_c_args + common_cflags + [
'-Wno-error=redundant-decls',
],
link_whole: gdk_backends,
)