Tools: Add a runtime scripting check flag

This commit is contained in:
Michael du Breuil 2018-11-03 14:59:27 -07:00 committed by WickedShell
parent dcfc90b911
commit 472cd9f48c

View File

@ -112,6 +112,11 @@ class Board:
'-DHAL_HAVE_AP_ROMFS_EMBEDDED_H' '-DHAL_HAVE_AP_ROMFS_EMBEDDED_H'
] ]
if cfg.options.scripting_checks:
env.DEFINES.update(
AP_SCRIPTING_CHECKS = 1,
)
if 'clang' in cfg.env.COMPILER_CC: if 'clang' in cfg.env.COMPILER_CC:
env.CFLAGS += [ env.CFLAGS += [
'-fcolor-diagnostics', '-fcolor-diagnostics',
@ -283,6 +288,7 @@ class sitl(Board):
env.DEFINES.update( env.DEFINES.update(
CONFIG_HAL_BOARD = 'HAL_BOARD_SITL', CONFIG_HAL_BOARD = 'HAL_BOARD_SITL',
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_NONE', CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_NONE',
AP_SCRIPTING_CHECKS = 1, # SITL should always do runtime scripting checks
) )
env.CXXFLAGS += [ env.CXXFLAGS += [