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++)
9set(LINKER xt-ld)
10
11list(APPEND TOOLCHAIN_C_FLAGS
12  -imacros${ZEPHYR_BASE}/include/zephyr/toolchain/xcc_missing_defs.h
13  )
14
15# GCC-based XCC uses GNU Assembler (xt-as).
16# However, CMake doesn't recognize it when invoking through xt-xcc.
17# This results in CMake going through all possible combinations of
18# command line arguments while invoking xt-xcc to determine
19# assembler vendor. This multiple invocation of xt-xcc unnecessarily
20# lengthens the CMake phase of build, especially when XCC needs to
21# obtain license information from remote licensing servers. So here
22# forces the assembler ID to be GNU to speed things up a bit.
23set(CMAKE_ASM_COMPILER_ID "GNU")
24
25message(STATUS "Found toolchain: xcc (${XTENSA_TOOLCHAIN_PATH})")
26