Skip to content

Commit 4a556a9

Browse files
committedSep 20, 2023
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>
1 parent 79ed6da commit 4a556a9

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed
 

‎CMakeLists.txt

+10-8
Original file line numberDiff line numberDiff line change
@@ -1816,14 +1816,16 @@ if(CONFIG_CHECK_INIT_PRIORITIES)
18161816
)
18171817
endif()
18181818

1819-
add_custom_target(
1820-
initlevels
1821-
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
1822-
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}
1823-
--initlevels
1824-
DEPENDS ${logical_target_for_zephyr_elf}
1825-
USES_TERMINAL
1826-
)
1819+
if(NOT CMAKE_C_COMPILER_ID STREQUAL "ARMClang")
1820+
add_custom_target(
1821+
initlevels
1822+
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
1823+
--elf-file=${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}
1824+
--initlevels
1825+
DEPENDS ${logical_target_for_zephyr_elf}
1826+
USES_TERMINAL
1827+
)
1828+
endif()
18271829

18281830
# Generate and use MCUboot related artifacts as needed.
18291831
if(CONFIG_BOOTLOADER_MCUBOOT)

‎Kconfig.zephyr

+1
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ config CHECK_INIT_PRIORITIES
748748
bool "Build time initialization priorities check"
749749
default y
750750
depends on !NATIVE_LIBRARY
751+
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "armclang"
751752
help
752753
Check the build for initialization priority issues by comparing the
753754
initialization priority in the build with the device dependency

0 commit comments

Comments
 (0)
Please sign in to comment.