1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_get(ARMCLANG_TOOLCHAIN_PATH) 4assert(ARMCLANG_TOOLCHAIN_PATH "ARMCLANG_TOOLCHAIN_PATH is not set") 5 6if(${CMAKE_VERSION} VERSION_LESS 3.21 7 AND NOT ${CMAKE_GENERATOR} STREQUAL Ninja 8) 9 message(FATAL_ERROR "ARMClang Toolchain and '${CMAKE_GENERATOR}' generator " 10 "doesn't work properly for target object files on CMake version: " 11 "${CMAKE_VERSION}. Use the 'Ninja' generator or update to CMake >= 3.21." 12 ) 13endif() 14 15if(NOT EXISTS ${ARMCLANG_TOOLCHAIN_PATH}) 16 message(FATAL_ERROR "Nothing found at ARMCLANG_TOOLCHAIN_PATH: '${ARMCLANG_TOOLCHAIN_PATH}'") 17endif() 18 19set(TOOLCHAIN_HOME ${ARMCLANG_TOOLCHAIN_PATH}) 20 21set(COMPILER armclang) 22set(LINKER armlink) 23set(BINTOOLS armclang) 24 25set(SYSROOT_TARGET arm) 26 27set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/) 28 29set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib") 30