[clang] [CMake][Fuchsia] Use standard spelling for Arm baremetal targets (PR #101302)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 01:17:28 PDT 2024


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

It's more common to use `none` rather than `unknown` for the OS component in Arm baremetal targets.

>From ac8f9a208ffaae64d31c699e2bc026f1cfae9dc8 Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Wed, 31 Jul 2024 01:16:34 -0700
Subject: [PATCH] [CMake][Fuchsia] Use standard spelling for Arm baremetal
 targets

It's more common to use `none` rather than `unknown` for the OS
component in Arm baremetal targets.
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index c1d0d7b63f957..4eba74a016782 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -300,7 +300,7 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
-foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
+foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi)
   list(APPEND BUILTIN_TARGETS "${target}")
   set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
@@ -308,7 +308,7 @@ foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
   set(BUILTINS_${target}_CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "")
   foreach(lang C;CXX;ASM)
     set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb")
-    if(${target} STREQUAL "armv8m.main-unknown-eabi")
+    if(${target} STREQUAL "armv8m.main-none-eabi")
       set(BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
     endif()
     set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "${BUILTINS_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")



More information about the cfe-commits mailing list