[llvm-branch-commits] [libcxx] [llvm] [libcxx] Add Testing Configuration for LLVM libc (PR #165120)

Aiden Grossman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 22 19:19:14 PDT 2026


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/165120

>From 89b37582c6479c857faffb87700915b6e7dedc73 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sat, 25 Oct 2025 22:03:59 +0000
Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?=
 =?UTF-8?q?anges=20to=20main=20this=20commit=20is=20based=20on?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7

[skip ci]
---
 runtimes/cmake/Modules/HandleLibC.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/runtimes/cmake/Modules/HandleLibC.cmake b/runtimes/cmake/Modules/HandleLibC.cmake
index 51fbf04df7e3b..01da5b260d3d4 100644
--- a/runtimes/cmake/Modules/HandleLibC.cmake
+++ b/runtimes/cmake/Modules/HandleLibC.cmake
@@ -30,6 +30,7 @@ elseif (RUNTIMES_USE_LIBC STREQUAL "llvm-libc")
   check_cxx_compiler_flag(-nostdlibinc CXX_SUPPORTS_NOSTDLIBINC_FLAG)
   if(CXX_SUPPORTS_NOSTDLIBINC_FLAG)
     target_compile_options(runtimes-libc-headers INTERFACE "-nostdlibinc")
+    target_compile_options(runtimes-libc-headers INTERFACE "-idirafter${LIBC_KERNEL_HEADERS}")
   endif()
 
   add_library(runtimes-libc-static INTERFACE)

>From e030a423648eb1587f2777d5c44b0703933cdcc9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 23 Apr 2026 02:19:03 +0000
Subject: [PATCH 2/2] update

Created using spr 1.3.7
---
 libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in b/libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in
index 292486e834760..605a890709400 100644
--- a/libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in
@@ -7,7 +7,7 @@ config.substitutions.append(('%{flags}',
     '-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '')
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include-dir} -I %{target-include-dir} -I @CMAKE_BINARY_DIR@/libc/include -I %{libcxx-dir}/test/support'
+    '-nostdlibinc -I %{include-dir} -I %{target-include-dir} -I @CMAKE_BINARY_DIR@/libc/include -I %{libcxx-dir}/test/support -idirafter @LIBC_KERNEL_HEADERS@'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nodefaultlibs -nostartfiles -L %{lib-dir} -lc++ -lc++abi @CMAKE_BINARY_DIR@/libc/startup/linux/crt1.o @CMAKE_BINARY_DIR@/libc/lib/libc.a @CMAKE_BINARY_DIR@/libc/lib/libm.a -static -fno-use-cxa-atexit @CMAKE_BINARY_DIR@/compiler-rt/lib/linux/libclang_rt.builtins-x86_64.a'



More information about the llvm-branch-commits mailing list