[libc-commits] [libc] [llvm] [libc] armv8m hard float build check (PR #214090)
Prabhu Rajasekaran via libc-commits
libc-commits at lists.llvm.org
Tue Aug 4 15:48:40 PDT 2026
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/214090
Our premerge checks were testing the softfp build for armv8m. Adding
also a hard float ABI check for this target to increase build check
coverage.
Assisted-by: Gemini
>From d3ae16e1f805a0dfadbf694864f9294a311a3c82 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Mon, 3 Aug 2026 10:08:16 -0700
Subject: [PATCH] [libc] armv8m hard float build check
Our premerge checks were testing the softfp build for armv8m. Adding
also a hard float ABI check for this target to increase build check
coverage.
---
.github/workflows/libc-fullbuild-tests.yml | 15 ++++++++++++---
.../cmake/caches/armv8m.main-none-eabi-hard.cmake | 8 ++++++++
.../caches/armv8m.main-none-eabi-softfp.cmake | 8 ++++++++
libc/cmake/caches/armv8m.main-none-eabi.cmake | 9 +--------
4 files changed, 29 insertions(+), 11 deletions(-)
create mode 100644 libc/cmake/caches/armv8m.main-none-eabi-hard.cmake
create mode 100644 libc/cmake/caches/armv8m.main-none-eabi-softfp.cmake
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index 03b73cb242b57..8f5aee19dc999 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -88,12 +88,21 @@ jobs:
cpp_compiler: clang++-23
target: armv7em-none-eabi
testing: SKIP
- - name: baremetal-armv8m
+ - name: baremetal-armv8m-softfp
os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-23
cpp_compiler: clang++-23
target: armv8m.main-none-eabi
+ cache_file: armv8m.main-none-eabi-softfp
+ testing: SKIP
+ - name: baremetal-armv8m-hard
+ os: ubuntu-24.04
+ build_type: MinSizeRel
+ c_compiler: clang-23
+ cpp_compiler: clang++-23
+ target: armv8m.main-none-eabi
+ cache_file: armv8m.main-none-eabi-hard
testing: SKIP
- name: baremetal-armv8.1m
os: ubuntu-24.04
@@ -134,7 +143,7 @@ jobs:
uses: hendrikmuhs/ccache-action at d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
with:
max-size: 1G
- key: libc_fullbuild_v3_${{ matrix.target }}_${{ matrix.build_type }}_${{ matrix.c_compiler }}
+ key: libc_fullbuild_v3_${{ matrix.name }}_${{ matrix.build_type }}_${{ matrix.c_compiler }}
variant: sccache
# Configure libc fullbuild with scudo.
@@ -179,7 +188,7 @@ jobs:
case "${{ matrix.name }}" in
baremetal-* )
cmake $CMAKE_FLAGS \
- -C /__w/llvm-project/llvm-project/libc/cmake/caches/${{ matrix.target }}.cmake
+ -C /__w/llvm-project/llvm-project/libc/cmake/caches/${{ matrix.cache_file || matrix.target }}.cmake
;;
*-gpu | uefi-* )
cmake \
diff --git a/libc/cmake/caches/armv8m.main-none-eabi-hard.cmake b/libc/cmake/caches/armv8m.main-none-eabi-hard.cmake
new file mode 100644
index 0000000000000..d0312cabb67eb
--- /dev/null
+++ b/libc/cmake/caches/armv8m.main-none-eabi-hard.cmake
@@ -0,0 +1,8 @@
+set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+set(RUNTIMES_TARGET_TRIPLE "armv8m.main-none-eabi" CACHE STRING "")
+
+foreach(lang C;CXX;ASM)
+ set(CMAKE_${lang}_FLAGS "-mfloat-abi=hard -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
+endforeach()
+
+include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv8m.main-none-eabi-softfp.cmake b/libc/cmake/caches/armv8m.main-none-eabi-softfp.cmake
new file mode 100644
index 0000000000000..4b69f6a822e71
--- /dev/null
+++ b/libc/cmake/caches/armv8m.main-none-eabi-softfp.cmake
@@ -0,0 +1,8 @@
+set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+set(RUNTIMES_TARGET_TRIPLE "armv8m.main-none-eabi" CACHE STRING "")
+
+foreach(lang C;CXX;ASM)
+ set(CMAKE_${lang}_FLAGS "-mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
+endforeach()
+
+include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv8m.main-none-eabi.cmake b/libc/cmake/caches/armv8m.main-none-eabi.cmake
index 4b69f6a822e71..46e9f24eb51d1 100644
--- a/libc/cmake/caches/armv8m.main-none-eabi.cmake
+++ b/libc/cmake/caches/armv8m.main-none-eabi.cmake
@@ -1,8 +1 @@
-set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
-set(RUNTIMES_TARGET_TRIPLE "armv8m.main-none-eabi" CACHE STRING "")
-
-foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
-endforeach()
-
-include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/armv8m.main-none-eabi-softfp.cmake)
More information about the libc-commits
mailing list