From ca0e860dbc43ad40c38fb05656995c20944b2238 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 1 Dec 2020 14:48:11 +0100 Subject: build: Enable debug if --buildtype=plain --- meson.build | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index a67231f9d..aa6cf228a 100644 --- a/meson.build +++ b/meson.build @@ -74,9 +74,17 @@ add_project_arguments(['-D', 'TRACKER_COMPILATION'], ['-D', 'G_LOG_STRUCTURED=1'], language: 'vala') -debug_cflags = [] -debug = get_option('debug') +if get_option('buildtype') == 'plain' + # Default case is to allow TRACKER_DEBUG which is very useful for + # triaging user-reported issues. + # Use --buildtype=release to disable debug completely. + debug = 1 +else + debug = get_option('debug') +endif optimization = get_option('optimization') + +debug_cflags = [] if debug debug_cflags += '-DG_ENABLE_DEBUG' if optimization in ['0', 'g'] -- cgit v1.2.1