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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3099>
This commit is contained in:
Robert Mader 2024-01-09 17:32:37 +01:00 committed by Robert Mader
parent 35f6056504
commit fa3124568c

View File

@ -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)