[llvm-branch-commits] [llvm] [libc] Build fuzzing tests in pre-merge CI tests (PR #185018)
Victor Campos via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 6 07:46:51 PST 2026
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/185018
>From f85ff8b38b8854ae76876fe9cd244187c7d56258 Mon Sep 17 00:00:00 2001
From: Victor Campos <victor.campos at arm.com>
Date: Fri, 6 Mar 2026 14:46:26 +0000
Subject: [PATCH 1/3] [libc] Build fuzzing tests in pre-merge CI tests
At the moment, no CI job tests whether the fuzzing tests build
correctly.
This patch adds the build of fuzzing tests to the pre-merge CI job.
---
.github/workflows/libc-fullbuild-tests.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index c796196b2180f..109ae93a917eb 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -121,7 +121,7 @@ jobs:
# Use MinSizeRel to reduce the size of the build.
- name: Configure CMake
run: |
- export RUNTIMES="libc"
+ export RUNTIMES="compiler-rt;libc"
export CMAKE_FLAGS="
-G Ninja
@@ -136,7 +136,6 @@ jobs:
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}"
if [[ ${{ matrix.include_scudo}} == "ON" ]]; then
- export RUNTIMES="$RUNTIMES;compiler-rt"
export CMAKE_FLAGS="$CMAKE_FLAGS
-DLLVM_LIBC_INCLUDE_SCUDO=ON
-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON
@@ -162,7 +161,7 @@ jobs:
cmake
--build ${{ steps.strings.outputs.build-output-dir }}
--parallel
- --target install
+ --target install libc-fuzzer
- name: Test
# Skip UEFI and baremetal tests until we have testing set up.
>From 6297c2484d8de4171c08a54ea794c0ff1a306877 Mon Sep 17 00:00:00 2001
From: Victor Campos <victor.campos at arm.com>
Date: Fri, 6 Mar 2026 15:19:32 +0000
Subject: [PATCH 2/3] 1. Run this job in all branches. 2. Remove outdated
comment about build type
---
.github/workflows/libc-fullbuild-tests.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index 109ae93a917eb..8ff5359076f96 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -4,7 +4,6 @@ permissions:
contents: read
on:
pull_request:
- branches: [ "main" ]
paths:
- 'libc/**'
- '.github/workflows/libc-fullbuild-tests.yml'
@@ -118,7 +117,6 @@ jobs:
echo "build-install-dir=/__w/llvm-project/llvm-project/install" >> "$GITHUB_OUTPUT"
# Configure libc fullbuild with scudo.
- # Use MinSizeRel to reduce the size of the build.
- name: Configure CMake
run: |
export RUNTIMES="compiler-rt;libc"
>From 623f51fbb58e5bb7cea6f1b4d99481b437f32f64 Mon Sep 17 00:00:00 2001
From: Victor Campos <victor.campos at arm.com>
Date: Fri, 6 Mar 2026 15:44:33 +0000
Subject: [PATCH 3/3] Build the fuzzing tests only on selected configurations
---
.github/workflows/libc-fullbuild-tests.yml | 35 +++++++++++++++++-----
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index 8ff5359076f96..f23abb4e1d3d0 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -30,66 +30,77 @@ jobs:
cpp_compiler: clang++-21
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: Release
c_compiler: clang-21
cpp_compiler: clang++-21
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ build_fuzzing_tests: ON
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04-arm
build_type: Debug
c_compiler: clang-21
cpp_compiler: clang++-21
target: aarch64-unknown-linux-llvm
include_scudo: ON
+ build_fuzzing_tests: ON
- os: ubuntu-24.04
build_type: Debug
c_compiler: clang-21
cpp_compiler: clang++-21
target: x86_64-unknown-uefi-llvm
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: armv6m-none-eabi
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: armv7m-none-eabi
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: armv7em-none-eabi
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: armv8m.main-none-eabi
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: armv8.1m.main-none-eabi
include_scudo: OFF
+ build_fuzzing_tests: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-21
cpp_compiler: clang++-21
target: riscv32-unknown-elf
include_scudo: OFF
+ build_fuzzing_tests: OFF
# TODO: add back gcc build when it is fixed
# - c_compiler: gcc
# cpp_compiler: g++
@@ -119,7 +130,7 @@ jobs:
# Configure libc fullbuild with scudo.
- name: Configure CMake
run: |
- export RUNTIMES="compiler-rt;libc"
+ export RUNTIMES="libc"
export CMAKE_FLAGS="
-G Ninja
@@ -133,7 +144,11 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}"
- if [[ ${{ matrix.include_scudo}} == "ON" ]]; then
+ if [[ "${{ matrix.include_scudo }}" == "ON" || "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
+ export RUNTIMES="$RUNTIMES;compiler-rt"
+ fi
+
+ if [[ "${{ matrix.include_scudo }}" == "ON" ]]; then
export CMAKE_FLAGS="$CMAKE_FLAGS
-DLLVM_LIBC_INCLUDE_SCUDO=ON
-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON
@@ -155,11 +170,17 @@ jobs:
esac
- name: Build
- run: >
- cmake
- --build ${{ steps.strings.outputs.build-output-dir }}
- --parallel
- --target install libc-fuzzer
+ shell: bash
+ run: |
+ TARGETS="install"
+ if [[ "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
+ TARGETS="$TARGETS libc-fuzzer"
+ fi
+
+ cmake \
+ --build ${{ steps.strings.outputs.build-output-dir }} \
+ --parallel \
+ --target $TARGETS
- name: Test
# Skip UEFI and baremetal tests until we have testing set up.
More information about the llvm-branch-commits
mailing list