[clang] [Fuchsia][CMake] Check correct triple to set -mcpu (PR #101910)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 4 16:31:52 PDT 2024


https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/101910

We use armv8m.main-none-eabi now, not armv8m.main-unknown-eabi.

>From e039c097f997cb95f2f3725c4efa6420c8ed48c0 Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Sun, 4 Aug 2024 16:30:35 -0700
Subject: [PATCH] [Fuchsia][CMake] Check correct triple to set -mcpu

We use armv8m.main-none-eabi now, not armv8m.main-unknown-eabi.
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 7d05940f0d092..fb9ebeeb0031f 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -328,7 +328,7 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi)
     # TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
     # These should be addressed and removed over time.
     set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1")
-    if(${target} STREQUAL "armv8m.main-unknown-eabi")
+    if(${target} STREQUAL "armv8m.main-none-eabi")
       set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
     endif()
     set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "${RUNTIMES_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")



More information about the cfe-commits mailing list