diff --git a/docs/macros.md b/docs/macros.md index eac9b6db9..00350e7d7 100644 --- a/docs/macros.md +++ b/docs/macros.md @@ -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` diff --git a/meson.options b/meson.options index 14ece1039..93207e0ed 100644 --- a/meson.options +++ b/meson.options @@ -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',