[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
Thu Oct 22 23:18:46 PDT 2026


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

>From 36676b5f2ee88aeed408e5561e208c91ccd9c7be 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 | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 2abd53c8ed3c6..39a3c12c25339 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 1c7a4252a69d6..0ffc2a5be792b 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -843,6 +843,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(
@@ -1104,6 +1107,9 @@ function(add_integration_test test_name)
   add_dependencies(${fq_build_target_name}
     libc.test.IntegrationTest.test
     ${INTEGRATION_TEST_DEPENDS})
+  if(TARGET libc-headers)
+    add_dependencies(${fq_build_target_name} libc-headers)
+  endif()
 
   _add_libc_test_runner(
     ${fq_target_name}

>From 0faba156c288246997145c0330ec200858e1b229 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 39a3c12c25339..ba91a0b79e674 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