mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: use array type option
Array type option is supported since 0.44.0.
This commit is contained in:
parent
8ea9fad715
commit
ad7aa76061
21
meson.build
21
meson.build
|
@ -760,20 +760,17 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||||
substs.set('SUSHELL', get_option('debug-shell'))
|
substs.set('SUSHELL', get_option('debug-shell'))
|
||||||
substs.set('DEBUGTTY', get_option('debug-tty'))
|
substs.set('DEBUGTTY', get_option('debug-tty'))
|
||||||
|
|
||||||
debug = get_option('debug')
|
|
||||||
enable_debug_hashmap = false
|
enable_debug_hashmap = false
|
||||||
enable_debug_mmap_cache = false
|
enable_debug_mmap_cache = false
|
||||||
if debug != ''
|
foreach name : get_option('debug')
|
||||||
foreach name : debug.split(',')
|
if name == 'hashmap'
|
||||||
if name == 'hashmap'
|
enable_debug_hashmap = true
|
||||||
enable_debug_hashmap = true
|
elif name == 'mmap-cache'
|
||||||
elif name == 'mmap-cache'
|
enable_debug_mmap_cache = true
|
||||||
enable_debug_mmap_cache = true
|
else
|
||||||
else
|
message('unknown debug option "@0@", ignoring'.format(name))
|
||||||
message('unknown debug option "@0@", ignoring'.format(name))
|
endif
|
||||||
endif
|
endforeach
|
||||||
endforeach
|
|
||||||
endif
|
|
||||||
conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
|
conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
|
||||||
conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
|
conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,8 @@ option('debug-shell', type : 'string', value : '/bin/sh',
|
||||||
description : 'path to debug shell binary')
|
description : 'path to debug shell binary')
|
||||||
option('debug-tty', type : 'string', value : '/dev/tty9',
|
option('debug-tty', type : 'string', value : '/dev/tty9',
|
||||||
description : 'specify the tty device for debug shell')
|
description : 'specify the tty device for debug shell')
|
||||||
option('debug', type : 'string',
|
option('debug', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [],
|
||||||
description : 'enable extra debugging (hashmap,mmap-cache)')
|
description : 'enable extra debugging')
|
||||||
option('memory-accounting-default', type : 'boolean',
|
option('memory-accounting-default', type : 'boolean',
|
||||||
description : 'enable MemoryAccounting= by default')
|
description : 'enable MemoryAccounting= by default')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue