[glib: 1/2] Disable cast checks in plain builds




commit 631e99667ed0b3e16bd33a8290dd889d1a5b1741
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Oct 14 15:34:22 2022 +0000

    Disable cast checks in plain builds

 meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index f44fa2d4e7..010ea5be31 100644
--- a/meson.build
+++ b/meson.build
@@ -298,11 +298,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]