compiler: clang: Add setting of ARM related flags
Mimic what we have in cmake/compiler/gcc/target.cmake for clang targetting ARM. Match gcc behavior by setting -fshort-enums Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
e5c03925e5
commit
25066e7875
1 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,18 @@ find_program(CMAKE_C_COMPILER clang ${find_program_clang_args})
|
|||
find_program(CMAKE_CXX_COMPILER clang++ ${find_program_clang_args})
|
||||
|
||||
if(NOT "${ARCH}" STREQUAL "posix")
|
||||
include(${ZEPHYR_BASE}/cmake/gcc-m-cpu.cmake)
|
||||
|
||||
if("${ARCH}" STREQUAL "arm")
|
||||
list(APPEND TOOLCHAIN_C_FLAGS
|
||||
-fshort-enums
|
||||
)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS
|
||||
-fshort-enums
|
||||
)
|
||||
|
||||
include(${ZEPHYR_BASE}/cmake/compiler/gcc/target_arm.cmake)
|
||||
endif()
|
||||
|
||||
foreach(file_name include/stddef.h include-fixed/limits.h)
|
||||
execute_process(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue