[libc-commits] [libc] [llvm] [ci][libc] Switch premerge libc runtime to full-build mode (PR #231937)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Sat Nov 7 03:37:57 PST 2026


https://github.com/kaladron updated https://github.com/llvm/llvm-project/pull/231937

>From e40960e7592d94100b3b0a698a91179f2a8cc735 Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Wed, 14 Oct 2026 13:58:34 +0100
Subject: [PATCH 1/2] [ci][libc] Switch premerge libc runtime to full-build
 mode

Enable full-build mode for libc in premerge CI when check-libc is
targeted, skipping death and shared math tests to keep execution fast.

Also add a libc-headers dependency to test rules to prevent parallel
build races against public header generation.

Assisted-by: Automated tooling, human reviewed.
---
 .ci/monolithic-linux.sh                    | 8 ++++++++
 libc/cmake/modules/LLVMLibCTestRules.cmake | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 2abd53c8ed3c6e..39a3c12c253394 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -37,6 +37,14 @@ if [[ " ${runtime_targets} " == *" check-libclc "* ]]; then
   )
 fi
 
+if [[ " ${runtime_targets} " == *" check-libc "* ]]; then
+  runtime_cmake_args+=(
+    -D LLVM_LIBC_FULL_BUILD=ON
+    -D LIBC_TEST_SKIP_DEATH_TESTS=ON
+    -D LIBC_TEST_SKIP_SHARED_TESTS=ON
+  )
+fi
+
 start-group "CMake"
 
 # Set the system llvm-symbolizer as preferred.
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index f86f79af2d3bd2..e05a9c1f4bbb84 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -861,6 +861,9 @@ function(create_libc_test fq_target_name)
     ${fq_build_target_name}
     ${fq_deps_list}
   )
+  if(TARGET libc-headers)
+    add_dependencies(${fq_build_target_name} libc-headers)
+  endif()
 
   # 5. Add test runner target
   _add_libc_test_runner(

>From a14dab28cfc0b27b1d461b3474288e0f2c68d2d3 Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Fri, 23 Oct 2026 07:16:16 +0100
Subject: [PATCH 2/2] [ci][libc] Pass multiarch kernel headers in premerge CI

Pass the Debian/Ubuntu multiarch directory in LIBC_KERNEL_HEADERS
so that <asm/mman.h> is found during full-build compilation.

Assisted-by: Automated tooling, human reviewed.
---
 .ci/monolithic-linux.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 39a3c12c253394..ba91a0b79e6741 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -38,10 +38,15 @@ if [[ " ${runtime_targets} " == *" check-libclc "* ]]; then
 fi
 
 if [[ " ${runtime_targets} " == *" check-libc "* ]]; then
+  libc_kernel_headers="/usr/include"
+  if [[ -d "/usr/include/$(uname -m)-linux-gnu" ]]; then
+    libc_kernel_headers="${libc_kernel_headers};/usr/include/$(uname -m)-linux-gnu"
+  fi
   runtime_cmake_args+=(
     -D LLVM_LIBC_FULL_BUILD=ON
     -D LIBC_TEST_SKIP_DEATH_TESTS=ON
     -D LIBC_TEST_SKIP_SHARED_TESTS=ON
+    -D LIBC_KERNEL_HEADERS="${libc_kernel_headers}"
   )
 fi
 



More information about the libc-commits mailing list