Skip to content
Merged
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
56db607
[libc][Github] Perform baremetal libc builds
Prabhuk Nov 11, 2025
981b670
Carve out a separate build step.
Prabhuk Nov 11, 2025
91c956f
Conditionally enable baremetal build.
Prabhuk Nov 11, 2025
16dac53
Add build step.
Prabhuk Nov 11, 2025
a4b12f6
Reuse build and install directories.
Prabhuk Nov 11, 2025
2a3c203
Guard baremetal config inside cmake step.
Prabhuk Nov 11, 2025
6d660cd
Remove baremetal check.
Prabhuk Nov 11, 2025
484396b
Add missing braces.
Prabhuk Nov 11, 2025
a4f6878
Guard test step. Skip compiler works cmake checks.
Prabhuk Nov 11, 2025
65d5107
Remove problematic test guard for now.
Prabhuk Nov 11, 2025
adf1e4f
Remove unnecessary spaces.
Prabhuk Nov 11, 2025
14b3572
Introduce a second target.
Prabhuk Nov 11, 2025
f5797ba
Use cache file for libc standalone build.
Prabhuk Nov 12, 2025
efc999f
Try to fix target if condition. Update cache file.
Prabhuk Nov 12, 2025
37bc709
Bring back enable_baremetal_build for experimentation.
Prabhuk Nov 12, 2025
97a969d
Add default target triple.
Prabhuk Nov 13, 2025
0601f69
Add LIBC_TARGET_TRIPLE
Prabhuk Nov 13, 2025
e616557
Cleanup cache file. Make it generic for all relevant baremetal target…
Prabhuk Nov 13, 2025
2810c45
Fix missing backslash.
Prabhuk Nov 13, 2025
9c203f5
Disable tests on baremetal builders.
Prabhuk Nov 13, 2025
2f4781f
Fix ending braces.
Prabhuk Nov 13, 2025
c00ac42
Use single quotes.
Prabhuk Nov 13, 2025
7f00c88
Drop enable_baremetal_build
Prabhuk Nov 13, 2025
500ddf2
Cleanup cache file.
Prabhuk Nov 13, 2025
dbe9e26
Address reviw comments.
Prabhuk Nov 13, 2025
9a6a569
Cache file location and name fix.
Prabhuk Nov 13, 2025
54bf553
Break out architecture specific flags into dedicated cache files.
Prabhuk Nov 15, 2025
4a3a8ca
Set ARCH_TRIPLE from cache files and not yml file.
Prabhuk Nov 15, 2025
bccaf16
Kinda important to set the command name.
Prabhuk Nov 15, 2025
384331f
Rename ARCH_TRIPLE and address other review comments.
Prabhuk Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 57 additions & 14 deletions .github/workflows/libc-fullbuild-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,49 @@ jobs:
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: Release
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
enable_baremetal_build: OFF
- os: ubuntu-24.04-arm
build_type: Debug
c_compiler: clang-22
cpp_compiler: clang++-22
target: aarch64-unknown-linux-llvm
include_scudo: ON
enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: Debug
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-uefi-llvm
include_scudo: OFF
enable_baremetal_build: OFF
- os: ubuntu-24.04
build__type: Release
c_compiler: clang-22
cpp_compiler: clang++-22
target: armv6m-none-eabi
include_scudo: OFF
enable_baremetal_build: ON
- os: ubuntu-24.04
build__type: Release
c_compiler: clang-22
cpp_compiler: clang++-22
target: armv7m-none-eabi
include_scudo: OFF
enable_baremetal_build: ON
# TODO: add back gcc build when it is fixed
# - c_compiler: gcc
# cpp_compiler: g++
Expand Down Expand Up @@ -102,19 +121,43 @@ jobs:
-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF"
fi

cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
-DLLVM_LIBC_FULL_BUILD=ON \
-G Ninja \
-S ${{ github.workspace }}/runtimes \
$CMAKE_FLAGS
if [[ ${{ matrix.enable_baremetal_build}} == "ON" ]]; then
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
-DLLVM_LIBC_FULL_BUILD=ON \
-G Ninja \
-S ${{ github.workspace }}/runtimes \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_LIBC_FULL_BUILD=ON \
-DCMAKE_C_COMPILER_TARGET=${{ matrix.target }} \
-DCMAKE_CXX_COMPILER_TARGET=${{ matrix.target }} \
-DCMAKE_ASM_COMPILER_TARGET=${{ matrix.target }} \
-DCMAKE_C_FLAGS=-mfloat-abi=soft \
-DCMAKE_CXX_FLAGS=-mfloat-abi=soft \
-DCMAKE_C_COMPILER_WORKS=ON \
-DCMAKE_CXX_COMPILER_WORKS=ON
else
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
-DLLVM_LIBC_FULL_BUILD=ON \
-G Ninja \
-S ${{ github.workspace }}/runtimes \
$CMAKE_FLAGS
fi

- name: Build
run: >
Expand All @@ -125,7 +168,7 @@ jobs:

- name: Test
# Skip UEFI tests until we have testing set up.
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') }}
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') }} && ${{ matrix.enable_baremetal_build }} == "OFF"
run: >
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
Expand Down
Loading