summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2022-10-14 15:34:22 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2022-10-14 15:34:22 +0000
commit870fc6763ecd55d8076a3856eb6b768c251fba56 (patch)
tree0023d1b35629a96a23e269e285d6a3489b2a7f86
parent1e9cf21b308111993b7223fedb139a749acbac44 (diff)
parent631e99667ed0b3e16bd33a8290dd889d1a5b1741 (diff)
downloadglib-870fc6763ecd55d8076a3856eb6b768c251fba56.tar.gz
Merge branch 'mcatanzaro/plain-build-cast-checks' into 'main'
Disable cast checks in plain builds See merge request GNOME/glib!2894
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 5fcaedb4c..7163cf0ad 100644
--- a/meson.build
+++ b/meson.build
@@ -257,11 +257,11 @@ endif
# optimization is 0 or g; otherwise, we have a production build.
glib_debug_cflags = []
glib_debug = get_option('glib_debug')
-optimized_build = get_option('optimization') not in [ '0', 'g' ]
-if glib_debug.enabled() or (glib_debug.auto() and get_option('debug') and not optimized_build)
+if (glib_debug.enabled() or (
+ glib_debug.auto() and get_option('debug') and get_option('optimization') in [ '0', 'g' ]))
glib_debug_cflags += ['-DG_ENABLE_DEBUG']
message('Enabling various debug infrastructure')
-elif optimized_build
+else
glib_debug_cflags += ['-DG_DISABLE_CAST_CHECKS']
message('Disabling cast checks')
endif