From 29ef092e243e2c2292985fd8f897b414087c4d87 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Dec 15 2020 09:45:34 +0000 Subject: meson: add -Dlog-trace to set LOG_TRACE The justification is the same as for -Dvalgrind: setting config in meson in this way is easier, because when the value is changed stuff that should be rebuilt is rebuilt. (cherry picked from commit fd5dec9adf76591d713f163d43d04e3beb76893e) Resolves: #1696224 patch_name: 0155-meson-add-Dlog-trace-to-set-LOG_TRACE.patch present_in_specfile: true location_in_specfile: 155 squash_commits: true --- diff --git a/meson.build b/meson.build index 709597e..c1013d5 100644 --- a/meson.build +++ b/meson.build @@ -782,6 +782,7 @@ conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap) conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache) conf.set10('VALGRIND', get_option('valgrind')) +conf.set10('LOG_TRACE', get_option('log-trace')) ##################################################################### @@ -2993,6 +2994,7 @@ foreach tuple : [ ['debug hashmap'], ['debug mmap cache'], ['valgrind', conf.get('VALGRIND') == 1], + ['trace logging', conf.get('LOG_TRACE') == 1], ] if tuple.length() >= 2 diff --git a/meson_options.txt b/meson_options.txt index 5716f45..f06a130 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,6 +52,8 @@ option('memory-accounting-default', type : 'boolean', description : 'enable MemoryAccounting= by default') option('valgrind', type : 'boolean', value : false, description : 'do extra operations to avoid valgrind warnings') +option('log-trace', type : 'boolean', value : false, + description : 'enable low level debug logging') option('utmp', type : 'boolean', description : 'support for utmp/wtmp log handling')