[v1,01/17] config: introduce global debug flag
Checks
Commit Message
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@intel.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
config/meson.build | 4 ++++
1 file changed, 4 insertions(+)
@@ -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