[clang] 2ad7b4a - [cmake][Fuchsia] armv8m -> armv8m.main (#98695)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 13:55:29 PDT 2024
Author: PiJoules
Date: 2024-07-12T13:55:25-07:00
New Revision: 2ad7b4af95bc333d8f216915cd1b9d688590dcc5
URL: https://github.com/llvm/llvm-project/commit/2ad7b4af95bc333d8f216915cd1b9d688590dcc5
DIFF: https://github.com/llvm/llvm-project/commit/2ad7b4af95bc333d8f216915cd1b9d688590dcc5.diff
LOG: [cmake][Fuchsia] armv8m -> armv8m.main (#98695)
armv8m builtins aren't being built because `armv8m` doesn't match any of
the arm cpu strings in compiler-rt cmake files. Instead there's
`armv8m.main` and `armv8m.base`. We want to use the `armv8m.main`
version.
Added:
Modified:
clang/cmake/caches/Fuchsia-stage2.cmake
Removed:
################################################################################
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 9892b5d58e719..b8c9db49863c6 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -300,14 +300,18 @@ 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-unknown-eabi)
+foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
list(APPEND BUILTIN_TARGETS "${target}")
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb")
+ if(${target} STREQUAL "armv8m.main-unknown-eabi")
+ set(BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=hard -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 "")
endforeach()
foreach(type SHARED;MODULE;EXE)
set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
More information about the cfe-commits
mailing list