mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
build: Add glib_debug option
To allow disabling debug infrastructure in builds with debug symbols.
This commit is contained in:
parent
2e3e35157e
commit
670b84ca30
@ -5,6 +5,10 @@ GLib's configure options and corresponding macros
|
|||||||
none
|
none
|
||||||
--buildtype={debug,debugoptimized} [debugoptimized is the default]
|
--buildtype={debug,debugoptimized} [debugoptimized is the default]
|
||||||
-DG_ENABLE_DEBUG -g
|
-DG_ENABLE_DEBUG -g
|
||||||
|
-Dglib_debug=disabled
|
||||||
|
Omits G_ENABLE_DEBUG when implied by --buildtype/-Ddebug
|
||||||
|
-Dglib_debug=enabled
|
||||||
|
Defines G_ENABLE_DEBUG regardless of --buildtype/-Ddebug
|
||||||
-Dglib_asserts=false
|
-Dglib_asserts=false
|
||||||
-DG_DISABLE_ASSERT
|
-DG_DISABLE_ASSERT
|
||||||
-Dglib_checks=false
|
-Dglib_checks=false
|
||||||
|
@ -235,7 +235,8 @@ endif
|
|||||||
# Use debug/optimization flags to determine whether to enable debug or disable
|
# Use debug/optimization flags to determine whether to enable debug or disable
|
||||||
# cast checks
|
# cast checks
|
||||||
glib_debug_cflags = []
|
glib_debug_cflags = []
|
||||||
if get_option('debug')
|
glib_debug = get_option('glib_debug')
|
||||||
|
if glib_debug.enabled() or (glib_debug.auto() and get_option('debug'))
|
||||||
glib_debug_cflags += ['-DG_ENABLE_DEBUG']
|
glib_debug_cflags += ['-DG_ENABLE_DEBUG']
|
||||||
message('Enabling various debug infrastructure')
|
message('Enabling various debug infrastructure')
|
||||||
elif get_option('optimization') in ['2', '3', 's']
|
elif get_option('optimization') in ['2', '3', 's']
|
||||||
|
@ -105,6 +105,12 @@ option('oss_fuzz',
|
|||||||
value : 'disabled',
|
value : 'disabled',
|
||||||
description : 'Indicate oss-fuzz build environment')
|
description : 'Indicate oss-fuzz build environment')
|
||||||
|
|
||||||
|
option('glib_debug',
|
||||||
|
type : 'feature',
|
||||||
|
value : 'auto',
|
||||||
|
yield : true,
|
||||||
|
description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
|
||||||
|
|
||||||
option('glib_assert',
|
option('glib_assert',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : true,
|
value : true,
|
||||||
|
Loading…
Reference in New Issue
Block a user