summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2020-12-01 14:48:11 +0100
committerSam Thursfield <sam@afuera.me.uk>2020-12-01 14:50:10 +0100
commitca0e860dbc43ad40c38fb05656995c20944b2238 (patch)
tree4785486f3c7ca5a2dac1df409c385c9561ac3a70
parent1f8db451f906894d72b8a012d1c3ef84de2bd049 (diff)
downloadtracker-sam/debug-plain.tar.gz
build: Enable debug if --buildtype=plainsam/debug-plain
-rw-r--r--meson.build12
1 files 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']