Fix clang toolchain file not setting target
This commit is contained in:
parent
59cc9ac810
commit
292f925ca6
@ -20,6 +20,11 @@ endif()
|
|||||||
# Get target processor from target triplet (first in triplet, ex. for arm-none-eabi -> arm)
|
# Get target processor from target triplet (first in triplet, ex. for arm-none-eabi -> arm)
|
||||||
string(REGEX MATCH "^[^-]*" TARGET_ARCHITECTURE ${TARGET_TRIPLET})
|
string(REGEX MATCH "^[^-]*" TARGET_ARCHITECTURE ${TARGET_TRIPLET})
|
||||||
|
|
||||||
|
# We need to tell clang what our target is
|
||||||
|
set(CMAKE_ASM_COMPILER_TARGET ${TARGET_TRIPLET})
|
||||||
|
set(CMAKE_C_COMPILER_TARGET ${TARGET_TRIPLET})
|
||||||
|
set(CMAKE_CXX_COMPILER_TARGET ${TARGET_TRIPLET})
|
||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME)
|
if(NOT CMAKE_SYSTEM_NAME)
|
||||||
# Cmake uses Generic as system name for embedded systems, use that here if
|
# Cmake uses Generic as system name for embedded systems, use that here if
|
||||||
# working on embedded systems
|
# working on embedded systems
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user