cmake: toolchain: Change the names of 'clang' and 'llvm'
The 'llvm' and 'clang' build scripts have been named strangely. It is more natural for 'clang' to be the compiler, and 'llvm' to be the toolchain. This commit rectifies this by renaming the files. This also fixes #11187 Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
parent
f1224c8f0a
commit
bb278b688e
2 changed files with 0 additions and 0 deletions
27
cmake/compiler/clang.cmake
Normal file
27
cmake/compiler/clang.cmake
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Configuration for host installed llvm
|
||||
#
|
||||
|
||||
set(NOSTDINC "")
|
||||
|
||||
# Note that NOSYSDEF_CFLAG may be an empty string, and
|
||||
# set_ifndef() does not work with empty string.
|
||||
if(NOT DEFINED NOSYSDEF_CFLAG)
|
||||
set(NOSYSDEF_CFLAG -undef)
|
||||
endif()
|
||||
|
||||
foreach(file_name include include-fixed)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
|
||||
OUTPUT_VARIABLE _OUTPUT
|
||||
)
|
||||
string(REGEX REPLACE "\n" "" _OUTPUT ${_OUTPUT})
|
||||
|
||||
list(APPEND NOSTDINC ${_OUTPUT})
|
||||
endforeach()
|
||||
|
||||
foreach(isystem_include_dir ${NOSTDINC})
|
||||
list(APPEND isystem_include_flags -isystem ${isystem_include_dir})
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files)
|
||||
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
Loading…
Add table
Add a link
Reference in a new issue