daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
4bff0a
From c405c3035b595970e65ac9586909618525372c45 Mon Sep 17 00:00:00 2001
4bff0a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
4bff0a
Date: Tue, 7 Aug 2018 17:34:47 +0200
4bff0a
Subject: [PATCH] meson: add -Dlog-trace to set LOG_TRACE
4bff0a
4bff0a
The justification is the same as for -Dvalgrind: setting config in
4bff0a
meson in this way is easier, because when the value is changed stuff
4bff0a
that should be rebuilt is rebuilt.
4bff0a
4bff0a
(cherry picked from commit fd5dec9adf76591d713f163d43d04e3beb76893e)
4bff0a
4bff0a
Resolves: #1696224
4bff0a
---
4bff0a
 meson.build       | 2 ++
4bff0a
 meson_options.txt | 2 ++
4bff0a
 2 files changed, 4 insertions(+)
4bff0a
4bff0a
diff --git a/meson.build b/meson.build
4bff0a
index 709597e5c4..c1013d525b 100644
4bff0a
--- a/meson.build
4bff0a
+++ b/meson.build
4bff0a
@@ -782,6 +782,7 @@ conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
4bff0a
 conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
4bff0a
 
4bff0a
 conf.set10('VALGRIND', get_option('valgrind'))
4bff0a
+conf.set10('LOG_TRACE', get_option('log-trace'))
4bff0a
 
4bff0a
 #####################################################################
4bff0a
 
4bff0a
@@ -2993,6 +2994,7 @@ foreach tuple : [
4bff0a
         ['debug hashmap'],
4bff0a
         ['debug mmap cache'],
4bff0a
         ['valgrind',         conf.get('VALGRIND') == 1],
4bff0a
+        ['trace logging',    conf.get('LOG_TRACE') == 1],
4bff0a
 ]
4bff0a
 
4bff0a
         if tuple.length() >= 2
4bff0a
diff --git a/meson_options.txt b/meson_options.txt
4bff0a
index 5716f45ccf..f06a130582 100644
4bff0a
--- a/meson_options.txt
4bff0a
+++ b/meson_options.txt
4bff0a
@@ -52,6 +52,8 @@ option('memory-accounting-default', type : 'boolean',
4bff0a
        description : 'enable MemoryAccounting= by default')
4bff0a
 option('valgrind', type : 'boolean', value : false,
4bff0a
        description : 'do extra operations to avoid valgrind warnings')
4bff0a
+option('log-trace', type : 'boolean', value : false,
4bff0a
+       description : 'enable low level debug logging')
4bff0a
 
4bff0a
 option('utmp', type : 'boolean',
4bff0a
        description : 'support for utmp/wtmp log handling')