4848 cpp_compiler : clang++-22
4949 target : x86_64-unknown-uefi-llvm
5050 include_scudo : OFF
51+ - os : ubuntu-24.04
52+ build_type : MinSizeRel
53+ c_compiler : clang-22
54+ cpp_compiler : clang++-22
55+ target : armv6m-none-eabi
56+ include_scudo : OFF
57+ - os : ubuntu-24.04
58+ build_type : MinSizeRel
59+ c_compiler : clang-22
60+ cpp_compiler : clang++-22
61+ target : armv7m-none-eabi
62+ include_scudo : OFF
63+ - os : ubuntu-24.04
64+ build_type : MinSizeRel
65+ c_compiler : clang-22
66+ cpp_compiler : clang++-22
67+ target : armv7em-none-eabi
68+ include_scudo : OFF
69+ - os : ubuntu-24.04
70+ build_type : MinSizeRel
71+ c_compiler : clang-22
72+ cpp_compiler : clang++-22
73+ target : armv8m.main-none-eabi
74+ include_scudo : OFF
75+ - os : ubuntu-24.04
76+ build_type : MinSizeRel
77+ c_compiler : clang-22
78+ cpp_compiler : clang++-22
79+ target : armv8.1m.main-none-eabi
80+ include_scudo : OFF
81+ - os : ubuntu-24.04
82+ build_type : MinSizeRel
83+ c_compiler : clang-22
84+ cpp_compiler : clang++-22
85+ target : riscv32-unknown-elf
86+ include_scudo : OFF
5187 # TODO: add back gcc build when it is fixed
5288 # - c_compiler: gcc
5389 # cpp_compiler: g++
@@ -93,28 +129,39 @@ jobs:
93129 run : |
94130 export RUNTIMES="libc"
95131
132+ export CMAKE_FLAGS="
133+ -G Ninja
134+ -S ${{ github.workspace }}/runtimes
135+ -B ${{ steps.strings.outputs.build-output-dir }}
136+ -DCMAKE_ASM_COMPILER=${{ matrix.c_compiler }}
137+ -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
138+ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
139+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
140+ -DCMAKE_C_COMPILER_LAUNCHER=sccache
141+ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
142+ -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}"
143+
96144 if [[ ${{ matrix.include_scudo}} == "ON" ]]; then
97145 export RUNTIMES="$RUNTIMES;compiler-rt"
98- export CMAKE_FLAGS="
146+ export CMAKE_FLAGS="$CMAKE_FLAGS
99147 -DLLVM_LIBC_INCLUDE_SCUDO=ON
100148 -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON
101149 -DCOMPILER_RT_BUILD_GWP_ASAN=OFF
102150 -DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF"
103151 fi
104152
105- cmake -B ${{ steps.strings.outputs.build-output-dir }} \
106- -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
107- -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
108- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
109- -DCMAKE_C_COMPILER_LAUNCHER=sccache \
110- -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
111- -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
112- -DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
113- -DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
114- -DLLVM_LIBC_FULL_BUILD=ON \
115- -G Ninja \
116- -S ${{ github.workspace }}/runtimes \
117- $CMAKE_FLAGS
153+ case "${{ matrix.target }}" in
154+ *-none-eabi|riscv32-unknown-elf)
155+ cmake $CMAKE_FLAGS \
156+ -C ${{ github.workspace }}/libc/cmake/caches/${{ matrix.target }}.cmake
157+ ;;
158+ *)
159+ cmake -DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
160+ -DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
161+ -DLLVM_LIBC_FULL_BUILD=ON \
162+ $CMAKE_FLAGS
163+ ;;
164+ esac
118165
119166 - name : Build
120167 run : >
@@ -124,8 +171,12 @@ jobs:
124171 --target install
125172
126173 - name : Test
127- # Skip UEFI tests until we have testing set up.
128- if : ${{ ! endsWith(matrix.target, '-uefi-llvm') }}
174+ # Skip UEFI and baremetal tests until we have testing set up.
175+ if : ${{
176+ !endsWith(matrix.target, '-uefi-llvm') &&
177+ !endsWith(matrix.target, '-none-eabi') &&
178+ matrix.target != 'riscv32-unknown-elf'
179+ }}
129180 run : >
130181 cmake
131182 --build ${{ steps.strings.outputs.build-output-dir }}
0 commit comments