From 2424a51918485388e51de4c26cbf7139f12e0edf Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 8 Sep 2024 21:35:52 -0400 Subject: [PATCH] gsk: 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. --- gsk/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gsk/meson.build b/gsk/meson.build index 087ebcfe37..40f7e707e7 100644 --- a/gsk/meson.build +++ b/gsk/meson.build @@ -232,6 +232,7 @@ libgsk_f16c = static_library('gsk_f16c', ) libgsk = static_library('gsk', + override_options: [ 'unity=on', 'unity_size=10000' ], sources: [ gsk_public_sources, gsk_private_sources, @@ -246,7 +247,9 @@ libgsk = static_library('gsk', '-DGTK_COMPILATION', '-DG_LOG_DOMAIN="Gsk"', '-DG_LOG_STRUCTURED=1', - ] + common_cflags, + ] + common_cflags + [ + '-Wno-error=redundant-decls', + ], link_with: [ libgdk, libgsk_f16c] )