Kconfig.zephyr: add an option for checking build time init priority
Add an option for running the build time initialization priority check as part of the build. By default the build is going to fail if any error is reported (dependent devices, inverted priority), optionally it can also be failed on warnings (dependent devices, same priority). Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
8412cb32ce
commit
2264c14fdf
2 changed files with 32 additions and 0 deletions
|
@ -1759,6 +1759,19 @@ if(CONFIG_BUILD_OUTPUT_INFO_HEADER)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_CHECK_INIT_PRIORITIES)
|
||||
if(CONFIG_CHECK_INIT_PRIORITIES_FAIL_ON_WARNING)
|
||||
set(fail_on_warning "--fail-on-warning")
|
||||
endif()
|
||||
list(APPEND
|
||||
post_build_commands
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
|
||||
--build-dir ${PROJECT_BINARY_DIR}/..
|
||||
--edt-pickle ${EDT_PICKLE}
|
||||
${fail_on_warning}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Generate and use MCUboot related artifacts as needed.
|
||||
if(CONFIG_BOOTLOADER_MCUBOOT)
|
||||
get_target_property(signing_script zephyr_property_target SIGNING_SCRIPT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue