the DDL framework supports adding custom build flags to the build process, allowing for fine-tuning of the build process.
available options are:
board_build.flags.common
: added to all build commandsboard_build.flags.c
: added to C build commands onlyboard_build.flags.cpp
: added to C++ build commands onlyboard_build.flags.asm
: added to assembly build commands onlyboard_build.flags.link
: added to linker commands only
Tip
build flags are added after the default flags, so you can override them if needed.
Important
only set extra build flags if you know what you're doing. incorrect build flags can cause the build to fail, or the firmware to behave incorrectly.
platformio.ini:
[env:myenv]
# ...
board_build.flags.cpp =
-fno-threadsafe-statics
-fno-exceptions