waf: enable heap methods for everything but bootloader

This commit is contained in:
bugobliterator 2020-03-17 06:04:28 +08:00 committed by Randy Mackay
parent a9ea7ca3dc
commit 10aa97f958

View File

@ -52,7 +52,6 @@ class Board:
env.DEFINES.update( env.DEFINES.update(
ENABLE_SCRIPTING = 1, ENABLE_SCRIPTING = 1,
ENABLE_HEAP = 1,
LUA_32BITS = 1, LUA_32BITS = 1,
) )
@ -152,6 +151,10 @@ class Board:
if cfg.options.bootloader: if cfg.options.bootloader:
# don't let bootloaders try and pull scripting in # don't let bootloaders try and pull scripting in
cfg.options.disable_scripting = True cfg.options.disable_scripting = True
else:
env.DEFINES.update(
ENABLE_HEAP = 1,
)
if cfg.options.enable_math_check_indexes: if cfg.options.enable_math_check_indexes:
env.CXXFLAGS += ['-DMATH_CHECK_INDEXES'] env.CXXFLAGS += ['-DMATH_CHECK_INDEXES']