diff --git a/CMakeLists.txt b/CMakeLists.txt index d0b25d16c8c..6d5c643f3e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 3523bb50617..4b6976a503f 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -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