[clang] [cmake][Fuchsia] armv8m -> armv8m.main (PR #98695)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 13:51:50 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: None (PiJoules)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/98695.diff
1 Files Affected:
- (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+6-2)
``````````diff
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 "")
``````````
</details>
https://github.com/llvm/llvm-project/pull/98695
More information about the cfe-commits
mailing list