Skip to content

Commit 83939c2

Browse files
dcpleungnashif
authored andcommitted
cmake: force assembler ID to be GNU for GCC-based XCC
GCC-based XCC uses GNU Assembler (xt-as). However, CMake doesn't recognize it when invoking through xt-xcc. This results in CMake going through all possible combinations of command line arguments while invoking xt-xcc to determine assembler vendor. This multiple invocation of xt-xcc unnecessarily lengthens the CMake phase of build, especially when XCC needs to obtain license information from remote licensing servers. So here forces the assembler ID to be GNU to speed things up a bit. Signed-off-by: Daniel Leung <[email protected]>
1 parent 860bd87 commit 83939c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmake/toolchain/xcc/generic.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ else()
3333
list(APPEND TOOLCHAIN_C_FLAGS
3434
-imacros${ZEPHYR_BASE}/include/toolchain/xcc_missing_defs.h
3535
)
36+
37+
# GCC-based XCC uses GNU Assembler (xt-as).
38+
# However, CMake doesn't recognize it when invoking through xt-xcc.
39+
# This results in CMake going through all possible combinations of
40+
# command line arguments while invoking xt-xcc to determine
41+
# assembler vendor. This multiple invocation of xt-xcc unnecessarily
42+
# lengthens the CMake phase of build, especially when XCC needs to
43+
# obtain license information from remote licensing servers. So here
44+
# forces the assembler ID to be GNU to speed things up a bit.
45+
set(CMAKE_ASM_COMPILER_ID "GNU")
3646
endif()
3747

3848
set(NOSYSDEF_CFLAG "")

0 commit comments

Comments
 (0)