From 292f925ca663ca2ef6a5048402c419fc0cd8662d Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Fri, 10 Jul 2026 18:41:12 -0700 Subject: [PATCH] Fix clang toolchain file not setting target --- cmake/clang.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/clang.cmake b/cmake/clang.cmake index 9c670f6..6cc6a08 100644 --- a/cmake/clang.cmake +++ b/cmake/clang.cmake @@ -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