cmake: toolchain: llvm: Move the compiler assignment into 'compiler'
Align 'clang' with gcc by having it also set CMAKE_C_COMPILER in the 'compiler' build script instead of the 'toolchain' build script. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
parent
bb278b688e
commit
ab2139a90f
2 changed files with 11 additions and 10 deletions
|
@ -9,6 +9,16 @@ if(NOT DEFINED NOSYSDEF_CFLAG)
|
|||
set(NOSYSDEF_CFLAG -undef)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_COMPILER ${CLANG_ROOT}/bin/clang)
|
||||
set(CMAKE_CXX_COMPILER ${CLANG_ROOT}/bin/clang++)
|
||||
set(CMAKE_AR ${CLANG_ROOT}/bin/llvm-ar CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_LINKER ${CLANG_ROOT}/bin/llvm-link CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_NM ${CLANG_ROOT}/bin/llvm-nm CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_OBJDUMP ${CLANG_ROOT}/bin/llvm-objdump CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_RANLIB ${CLANG_ROOT}/bin/llvm-ranlib CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_OBJCOPY objcopy CACHE INTERNAL " " FORCE)
|
||||
set(CMAKE_READELF readelf CACHE INTERNAL " " FORCE)
|
||||
|
||||
foreach(file_name include include-fixed)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue