[Lldb-commits] [lldb] [lldb][test] Downgrade missing-libcxx check from error to warning (PR #199262)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri May 22 12:28:53 PDT 2026
https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/199262
>From 737030c6a3cc632a54c19e25d4852aa32cb570a3 Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani <ismail at bennani.ma>
Date: Fri, 22 May 2026 12:27:48 -0700
Subject: [PATCH] [lldb/test] Downgrade missing-libcxx check from error to
warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The cmake check that fails when LLDB_HAS_LIBCXX is OFF is too strict:
the test infrastructure already handles the missing-libcxx case
gracefully (lldb/test/API/lit.cfg.py only adds --libcxx-include-dir /
--libcxx-library-dir to the dotest command when config.has_libcxx is
true, otherwise dotest falls back to whatever libc++ the compiler
picks up by default — system libc++ on Darwin).
Hard-failing the cmake configure means downstreams that intentionally
opt out of building libc++ in-tree can't keep LLDB_INCLUDE_TESTS=ON to
get the ninja check-lldb-* targets generated for tests they actually
want to run (Shell tests, non-libc++ API tests, cloud-device tests, etc.).
Downgrade the SEND_ERROR to WARNING and rephrase the message so it
reflects the actual fallback behavior instead of demanding the user
either enable libcxx or disable tests outright.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
---
lldb/test/CMakeLists.txt | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index ed9dcd11cc6cd..fdfa1fa83efef 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -205,13 +205,16 @@ if(TARGET clang)
"LLDB_TEST_LIBCXX_ROOT_DIR to it.")
endif()
else()
- # We require libcxx for the test suite, so if we aren't building it,
- # provide a helpful error about how to resolve the situation.
+ # The LLDB test suite uses libc++ for many tests. If it isn't being
+ # built in-tree, warn and let the suite fall back to whatever libc++
+ # the compiler picks up by default (the system one on Darwin); the
+ # libc++-specific tests will be skipped or run against system libc++.
if(NOT LLDB_HAS_LIBCXX)
- message(SEND_ERROR
- "LLDB test suite requires libc++, but it is currently disabled. "
- "Please add `libcxx` to `LLVM_ENABLE_RUNTIMES` or disable tests via "
- "`LLDB_INCLUDE_TESTS=OFF`.")
+ message(WARNING
+ "LLDB test suite normally uses an in-tree libc++; it is currently "
+ "disabled. libc++-specific tests will be skipped or fall back to the "
+ "system libc++. Add `libcxx` to `LLVM_ENABLE_RUNTIMES` to enable "
+ "the full test surface.")
endif()
endif()
endif()
More information about the lldb-commits
mailing list