clang: use LLVM_TOOLCHAIN_PATH instead of CLANG_ROOT_DIR

Be consistent with other toolchains.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-10-29 08:53:01 -04:00
commit 03de10091a

View file

@ -1,9 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
if(DEFINED $ENV{CLANG_ROOT_DIR})
set(TOOLCHAIN_HOME ${CLANG_ROOT}/bin/)
set_ifndef(LLVM_TOOLCHAIN_PATH "$ENV{CLANG_ROOT_DIR}")
set_ifndef(LLVM_TOOLCHAIN_PATH "$ENV{LLVM_TOOLCHAIN_PATH}")
if(LLVM_TOOLCHAIN_PATH)
set(TOOLCHAIN_HOME ${LLVM_TOOLCHAIN_PATH}/bin/)
endif()
set(LLVM_TOOLCHAIN_PATH ${CLANG_ROOT_DIR} CACHE PATH "clang install directory")
set(COMPILER clang)
set(LINKER ld) # TODO: Use lld eventually rather than GNU ld
set(BINTOOLS llvm)