[llvm] [CI] Add precommit CIs to test compiler-rt + LLVM libc integration. (PR #200196)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 16:42:16 PDT 2026
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/200196
>From 79b8c05e4e0e061456c863c4b8e1eafd944c999f Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Thu, 28 May 2026 17:45:03 +0300
Subject: [PATCH 1/7] [CI] Add precommit CIs to test compiler-rt + LLVM libc
integration.
---
.../compiler-rt-libc-builtins-tests.yml | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 .github/workflows/compiler-rt-libc-builtins-tests.yml
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
new file mode 100644
index 0000000000000..3dab28c0387a7
--- /dev/null
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -0,0 +1,58 @@
+# Pre-commit CI for the compiler-rt + LLVM-libc builtins integration.
+name: compiler-rt + libc Builtins Tests
+permissions:
+ contents: read
+on:
+ pull_request:
+ branches: ["main"]
+ paths:
+ - "compiler-rt/lib/builtins/**"
+ - "compiler-rt/test/builtins/**"
+ - "libc/shared/builtins.h"
+ - "libc/shared/builtins/**"
+ - "libc/src/__support/builtins/**"
+ - "libc/src/__support/FPUtil/**"
+ - ".github/workflows/compiler-rt-libc-builtins-tests.yml"
+
+jobs:
+ build:
+ name: builtins (${{ matrix.os }})
+ if: github.repository_owner == 'llvm'
+ runs-on: ${{ matrix.os }}
+ container:
+ image: ${{ (startsWith(matrix.os, 'ubuntu-24.04-arm') && 'ghcr.io/llvm/arm64v8/libc-ubuntu-24.04') || 'ghcr.io/llvm/libc-ubuntu-24.04' }}
+ options: >-
+ --privileged
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-24.04, ubuntu-24.04-arm]
+
+ steps:
+ - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false
+
+ - name: Configure CMake
+ shell: bash
+ run: |
+ cmake \
+ -B build \
+ -S llvm \
+ -G Ninja \
+ -DCMAKE_C_COMPILER=clang-23 \
+ -DCMAKE_CXX_COMPILER=clang++-23 \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_ENABLE_ASSERTIONS=ON \
+ -DLLVM_ENABLE_PROJECTS=clang \
+ -DLLVM_ENABLE_RUNTIMES="compiler-rt" \
+ -DCOMPILER_RT_USE_LIBC_MATH=ON \
+ -DCOMPILER_RT_INCLUDE_TESTS=ON
+
+ - name: Test compiler-rt builtins
+ shell: bash
+ run: |
+ cmake \
+ --build build \
+ --parallel \
+ --target check-builtins
>From ac637b8ca4a3f88c172eaf426096f527275a8d5e Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Mon, 1 Jun 2026 00:50:36 +0300
Subject: [PATCH 2/7] allow all branches
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index 3dab28c0387a7..ba9c9ecf38bdb 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -4,7 +4,6 @@ permissions:
contents: read
on:
pull_request:
- branches: ["main"]
paths:
- "compiler-rt/lib/builtins/**"
- "compiler-rt/test/builtins/**"
>From c3ee1328b992f5705e5f4095912e62cb4570d10f Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Tue, 7 Jul 2026 06:07:47 +0300
Subject: [PATCH 3/7] enable `COMPILER_RT_STANDALONE_BUILD`
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index ba9c9ecf38bdb..70171326ebfbd 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -20,8 +20,6 @@ jobs:
runs-on: ${{ matrix.os }}
container:
image: ${{ (startsWith(matrix.os, 'ubuntu-24.04-arm') && 'ghcr.io/llvm/arm64v8/libc-ubuntu-24.04') || 'ghcr.io/llvm/libc-ubuntu-24.04' }}
- options: >-
- --privileged
strategy:
fail-fast: false
matrix:
@@ -33,7 +31,6 @@ jobs:
persist-credentials: false
- name: Configure CMake
- shell: bash
run: |
cmake \
-B build \
@@ -43,13 +40,12 @@ jobs:
-DCMAKE_CXX_COMPILER=clang++-23 \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
- -DLLVM_ENABLE_PROJECTS=clang \
+ -DCOMPILER_RT_STANDALONE_BUILD=On \
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
-DCOMPILER_RT_USE_LIBC_MATH=ON \
-DCOMPILER_RT_INCLUDE_TESTS=ON
- name: Test compiler-rt builtins
- shell: bash
run: |
cmake \
--build build \
>From 58786d61ef6c843805c5b415e190f2aa88693841 Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Tue, 7 Jul 2026 06:31:40 +0300
Subject: [PATCH 4/7] build from `compiler-rt` as entrypoint
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index 70171326ebfbd..67f20f9390502 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -34,14 +34,13 @@ jobs:
run: |
cmake \
-B build \
- -S llvm \
+ -S compiler-rt \
-G Ninja \
-DCMAKE_C_COMPILER=clang-23 \
-DCMAKE_CXX_COMPILER=clang++-23 \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
- -DCOMPILER_RT_STANDALONE_BUILD=On \
- -DLLVM_ENABLE_RUNTIMES="compiler-rt" \
+ -DCOMPILER_RT_STANDALONE_BUILD=ON \
-DCOMPILER_RT_USE_LIBC_MATH=ON \
-DCOMPILER_RT_INCLUDE_TESTS=ON
>From 28898ecb83bf11054ec5d59cc217d6b88e3b1908 Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Tue, 7 Jul 2026 17:41:23 +0300
Subject: [PATCH 5/7] use llvm entrypoint
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index 67f20f9390502..3efe20f3087a4 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -34,13 +34,14 @@ jobs:
run: |
cmake \
-B build \
- -S compiler-rt \
+ -S llvm \
-G Ninja \
-DCMAKE_C_COMPILER=clang-23 \
-DCMAKE_CXX_COMPILER=clang++-23 \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCOMPILER_RT_STANDALONE_BUILD=ON \
+ -DLLVM_ENABLE_PROJECTS="compiler-rt" \
-DCOMPILER_RT_USE_LIBC_MATH=ON \
-DCOMPILER_RT_INCLUDE_TESTS=ON
>From ec2cb91502520725d6132511535eb7fe28b7bbff Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Tue, 7 Jul 2026 17:58:45 +0300
Subject: [PATCH 6/7] Revert "use llvm entrypoint"
This reverts commit 28898ecb83bf11054ec5d59cc217d6b88e3b1908.
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index 3efe20f3087a4..67f20f9390502 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -34,14 +34,13 @@ jobs:
run: |
cmake \
-B build \
- -S llvm \
+ -S compiler-rt \
-G Ninja \
-DCMAKE_C_COMPILER=clang-23 \
-DCMAKE_CXX_COMPILER=clang++-23 \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCOMPILER_RT_STANDALONE_BUILD=ON \
- -DLLVM_ENABLE_PROJECTS="compiler-rt" \
-DCOMPILER_RT_USE_LIBC_MATH=ON \
-DCOMPILER_RT_INCLUDE_TESTS=ON
>From 88caf9eb1c261368e45497e0c4e45b8077f48c67 Mon Sep 17 00:00:00 2001
From: hulxv <hulxxv at gmail.com>
Date: Fri, 17 Jul 2026 21:16:10 +0300
Subject: [PATCH 7/7] use `runtimes` instead of `compiler-rt` as entrypoint
Co-authored-by: Michael Jones <michaelrj at google.com>
---
.github/workflows/compiler-rt-libc-builtins-tests.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/compiler-rt-libc-builtins-tests.yml b/.github/workflows/compiler-rt-libc-builtins-tests.yml
index 67f20f9390502..a01f188bd70ce 100644
--- a/.github/workflows/compiler-rt-libc-builtins-tests.yml
+++ b/.github/workflows/compiler-rt-libc-builtins-tests.yml
@@ -34,7 +34,8 @@ jobs:
run: |
cmake \
-B build \
- -S compiler-rt \
+ -S runtimes \
+ -DLLVM_ENABLE_RUNTIMES=compiler-rt \
-G Ninja \
-DCMAKE_C_COMPILER=clang-23 \
-DCMAKE_CXX_COMPILER=clang++-23 \
More information about the llvm-commits
mailing list