cmake: skip build time priority checking with armclang

The script does not play well with armclang binariest at the moment.
Disable the automatic invocation when running with armclang, at least
until this is investigated and fixed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2023-09-18 11:35:35 +00:00 committed by Fabio Baltieri
commit 4a556a925c
2 changed files with 11 additions and 8 deletions

View file

@ -1816,14 +1816,16 @@ if(CONFIG_CHECK_INIT_PRIORITIES)
)
endif()
add_custom_target(
initlevels
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}
--initlevels
DEPENDS ${logical_target_for_zephyr_elf}
USES_TERMINAL
)
if(NOT CMAKE_C_COMPILER_ID STREQUAL "ARMClang")
add_custom_target(
initlevels
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}
--initlevels
DEPENDS ${logical_target_for_zephyr_elf}
USES_TERMINAL
)
endif()
# Generate and use MCUboot related artifacts as needed.
if(CONFIG_BOOTLOADER_MCUBOOT)

View file

@ -748,6 +748,7 @@ config CHECK_INIT_PRIORITIES
bool "Build time initialization priorities check"
default y
depends on !NATIVE_LIBRARY
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "armclang"
help
Check the build for initialization priority issues by comparing the
initialization priority in the build with the device dependency