Merge branch '3421-glib_debug-docs' into 'main'

docs: Set -Dglib_debug=enabled by default and document it for distros

Closes #3421

See merge request GNOME/glib!4212
This commit is contained in:
Philip Withnall 2024-08-25 18:51:13 +00:00
commit f92da0cb49
2 changed files with 8 additions and 4 deletions

View File

@ -61,6 +61,10 @@ Quite a bit of additional debugging code is compiled into GLib when this
macro is defined, and since it is a globally visible define, third-party code
may be affected by it similarly to `G_DISABLE_ASSERT`.
Some of these checks can be relatively expensive at runtime, as they affect
every GObject type cast. Distributions are recommended to disable
`G_ENABLE_DEBUG` in stable release builds.
The additional code executed/compiled for this macro currently includes the
following, but this is not an exhaustive list:
- extra validity checks for `GDate`

View File

@ -115,21 +115,21 @@ option('oss_fuzz',
option('glib_debug',
type : 'feature',
value : 'auto',
value : 'enabled',
yield : true,
description : 'Enable GLib debug infrastructure (see docs/macros.txt)')
description : 'Enable GLib debug infrastructure (distros typically want this disabled in production; see docs/macros.md)')
option('glib_assert',
type : 'boolean',
value : true,
yield : true,
description : 'Enable GLib assertion (see docs/macros.txt)')
description : 'Enable GLib assertion (see docs/macros.md)')
option('glib_checks',
type : 'boolean',
value : true,
yield : true,
description : 'Enable GLib checks such as API guards (see docs/macros.txt)')
description : 'Enable GLib checks such as API guards (see docs/macros.md)')
option('libelf',
type : 'feature',