Skip to content

Commit 2ad7b4a

Browse files
authored
[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.
1 parent 1ccd875 commit 2ad7b4a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,18 @@ if(FUCHSIA_SDK)
300300
set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
301301
endif()
302302

303-
foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m-unknown-eabi)
303+
foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
304304
list(APPEND BUILTIN_TARGETS "${target}")
305305
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
306306
set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
307307
set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
308308
set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
309309
foreach(lang C;CXX;ASM)
310-
set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb" CACHE STRING "")
310+
set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb")
311+
if(${target} STREQUAL "armv8m.main-unknown-eabi")
312+
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 "")
313+
endif()
314+
set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "${BUILTINS_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
311315
endforeach()
312316
foreach(type SHARED;MODULE;EXE)
313317
set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")

0 commit comments

Comments
 (0)