[dpdk-dev] [PATCH v1 01/17] config: introduce global debug flag

Lukasz Wojciechowski l.wojciechow at partner.samsung.com
Fri Apr 17 23:57:23 CEST 2020


There already is a meson core option "debug". To enable this option
add -Ddebug=true to the meson command during setup or configuration
of the build environment.

By enabling this flag the globaly defined macro RTE_DEBUG becomes
defined. It should be used for enabling debug code in all dpdk project
components. Using this flag allows to make additional checks or tests
and provide additional logs even in performance sensitive parts of code.

The flag is disabled by default.

Suggested-by: Bruce Richardson <bruce.richardson at intel.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
---
 config/meson.build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 58421342b..04909f922 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -176,6 +176,10 @@ endif
 # add -include rte_config to cflags
 add_project_arguments('-include', 'rte_config.h', language: 'c')
 
+if get_option('debug')
+	dpdk_conf.set('RTE_DEBUG', 1)
+endif
+
 # enable extra warnings and disable any unwanted warnings
 warning_flags = [
 	# -Wall is added by meson by default, so add -Wextra only
-- 
2.17.1



More information about the dev mailing list