1# SPDX-License-Identifier: Apache-2.0
2
3include(${ZEPHYR_BASE}/cmake/toolchain/xcc/common.cmake)
4
5set(COMPILER xcc)
6set(OPTIMIZE_FOR_DEBUG_FLAG "-O0")
7set(CC xcc)
8set(C++ xc++)
9
10list(APPEND TOOLCHAIN_C_FLAGS
11  -imacros${ZEPHYR_BASE}/include/zephyr/toolchain/xcc_missing_defs.h
12  )
13
14# GCC-based XCC uses GNU Assembler (xt-as).
15# However, CMake doesn't recognize it when invoking through xt-xcc.
16# This results in CMake going through all possible combinations of
17# command line arguments while invoking xt-xcc to determine
18# assembler vendor. This multiple invocation of xt-xcc unnecessarily
19# lengthens the CMake phase of build, especially when XCC needs to
20# obtain license information from remote licensing servers. So here
21# forces the assembler ID to be GNU to speed things up a bit.
22set(CMAKE_ASM_COMPILER_ID "GNU")
23
24message(STATUS "Found toolchain: xcc (${XTENSA_TOOLCHAIN_PATH})")
25