1# SPDX-License-Identifier: Apache-2.0
2
3# Purpose of the generic.cmake is to define a generic C compiler which can be
4# used for devicetree pre-processing and other pre-processing tasks which must
5# be performed before the target can be determined.
6
7# Todo: deprecate CLANG_ROOT_DIR
8set_ifndef(LLVM_TOOLCHAIN_PATH "$ENV{CLANG_ROOT_DIR}")
9zephyr_get(LLVM_TOOLCHAIN_PATH)
10
11if(LLVM_TOOLCHAIN_PATH)
12  set(TOOLCHAIN_HOME ${LLVM_TOOLCHAIN_PATH}/bin/)
13endif()
14
15set(LLVM_TOOLCHAIN_PATH ${CLANG_ROOT_DIR} CACHE PATH "clang install directory")
16
17set(COMPILER clang)
18set(BINTOOLS llvm)
19
20set(TOOLCHAIN_HAS_NEWLIB OFF CACHE BOOL "True if toolchain supports newlib")
21
22message(STATUS "Found toolchain: host (clang/ld)")
23