Fix clang toolchain file not setting target

This commit is contained in:
Madeline Busig 2026-07-10 18:41:12 -07:00
parent 59cc9ac810
commit 292f925ca6

View File

@ -20,6 +20,11 @@ endif()
# Get target processor from target triplet (first in triplet, ex. for arm-none-eabi -> arm)
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)
# Cmake uses Generic as system name for embedded systems, use that here if
# working on embedded systems