waf: added -g option to configure

this adds debug symbolds to the build without enabling other debug
code. This is needed for analysing watchdog crash dumps
This commit is contained in:
Andrew Tridgell 2023-05-01 10:54:56 +10:00
parent 0553d06c14
commit 57d47e080b
2 changed files with 9 additions and 0 deletions

View File

@ -261,6 +261,10 @@ class Board:
env.DEFINES.update(
HAL_DEBUG_BUILD = 1,
)
elif cfg.options.g:
env.CFLAGS += [
'-g',
]
if cfg.env.COVERAGE:
env.CFLAGS += [
'-fprofile-arcs',

View File

@ -125,6 +125,11 @@ def options(opt):
default=False,
help='Configure as debug variant.')
g.add_option('-g',
action='store_true',
default=False,
help='Add debug symbolds to build.')
g.add_option('--disable-watchdog',
action='store_true',
default=False,