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 29556ade25
commit 775f12387c
2 changed files with 9 additions and 0 deletions

View File

@ -275,6 +275,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

@ -126,6 +126,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,