]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add forgotten debug options
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Apr 2017 00:51:34 +0000 (20:51 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 May 2017 20:28:40 +0000 (16:28 -0400)
v2:
-rename -Dextra-debug to -Ddebug to match ./configure --debug

meson.build
meson_options.txt

index 79843c73197fd750e51d2b42fbd9a02a0aa12c52..133ae57cf819523015c5c42a3d346dc1bb8caf7d 100644 (file)
@@ -613,6 +613,19 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 substs.set('SUSHELL', get_option('debug-shell'))
 substs.set('DEBUGTTY', get_option('debug-tty'))
 
+debug = get_option('debug')
+if debug != ''
+        foreach name : debug.split(',')
+                if name == 'hashmap'
+                        conf.set('ENABLE_DEBUG_HASHMAP', 1)
+                elif name == 'mmap-cache'
+                        conf.set('ENABLE_DEBUG_MMAP_CACHE', 1)
+                else
+                        message('unknown debug option "@0@", ignoring'.format(name))
+                endif
+        endforeach
+endif
+
 #####################################################################
 
 threads = dependency('threads')
index 6d40c3f806968b3fdc07d7aa6ceb6cf33c4cda91..4e99b25e63fc9b18de2867b9d3f7053956e6ee64 100644 (file)
@@ -34,6 +34,8 @@ option('debug-shell', type : 'string', value : '/bin/sh',
        description : 'path to debug shell binary')
 option('debug-tty', type : 'string', value : '/dev/tty9',
        description : 'specify the tty device for debug shell')
+option('debug', type : 'string',
+       description : 'enable extra debugging (hashmap,mmap-cache)')
 
 option('utmp', type : 'boolean',
        description : 'support for utmp/wtmp log handling')