From fa3124568c8aee31374eb3f2fcb4e6c06dc179aa Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Tue, 9 Jan 2024 17:32:37 +0100 Subject: [PATCH] build: Disable asserts and cast checks For non-debug and non-plain cases - i.e. mainly release builds - in order to mirror Mutter. One advantage of doing this is that it allows us to use non-trivial asserts more generously, such as calling `g_list_length()`. Part-of: --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 214a955c0..0a994edbe 100644 --- a/meson.build +++ b/meson.build @@ -225,6 +225,11 @@ if buildtype != 'plain' gs_c_args += [ '-DG_ENABLE_DEBUG', ] + else + gs_c_args += [ + '-DG_DISABLE_ASSERT', + '-DG_DISABLE_CAST_CHECKS', + ] endif supported_gs_c_args = cc.get_supported_arguments(gs_c_args)