Skip to content

Commit d4ce292

Browse files
ozhurakinashif
authored andcommitted
cmake: clang: Allow host's clang to be used for native_posix
Allow host installed clang to be used for native_posix when ZEPHYR_TOOLCHAIN_VARIANT=llvm. Signed-off-by: Oleg Zhurakivskyy <[email protected]>
1 parent b54f1a9 commit d4ce292

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/generic_toolchain.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ assert(ZEPHYR_TOOLCHAIN_VARIANT "Zephyr toolchain variant invalid: please set th
5050

5151
# Pick host system's toolchain if we are targeting posix
5252
if((${ARCH} STREQUAL "posix") OR (${ARCH} STREQUAL "x86_64"))
53-
set(ZEPHYR_TOOLCHAIN_VARIANT "host")
53+
if(NOT "${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "llvm")
54+
set(ZEPHYR_TOOLCHAIN_VARIANT "host")
55+
endif()
5456
endif()
5557

5658
# Configure the toolchain based on what SDK/toolchain is in use.

0 commit comments

Comments
 (0)