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 <oleg.zhurakivskyy@intel.com>
This commit is contained in:
Oleg Zhurakivskyy 2019-03-08 12:37:57 +02:00 committed by Anas Nashif
commit d4ce29243b

View file

@ -50,7 +50,9 @@ assert(ZEPHYR_TOOLCHAIN_VARIANT "Zephyr toolchain variant invalid: please set th
# Pick host system's toolchain if we are targeting posix
if((${ARCH} STREQUAL "posix") OR (${ARCH} STREQUAL "x86_64"))
set(ZEPHYR_TOOLCHAIN_VARIANT "host")
if(NOT "${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "llvm")
set(ZEPHYR_TOOLCHAIN_VARIANT "host")
endif()
endif()
# Configure the toolchain based on what SDK/toolchain is in use.