https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/199262
>From 0aa1f8be2a65a7147c31067f09eea306e8d33809 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani <[email protected]> Date: Fri, 22 May 2026 12:31:38 -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. 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). Dotest also has a category-based skip path: checkLibcxxSupport() appends "libc++" to configuration.skip_categories when libc++ isn't available and the user hasn't explicitly asked for it, so the @add_test_categories(["libc++"]) tests are filtered out automatically. On Darwin canRunLibcxxTests() always returns True (SDK libc++ is present), so libc++ tests still run there — against the SDK's libc++. 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 for the tests they do want to run (Shell tests, non-libc++ API tests, cloud-device tests, etc.). Downgrade 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 <[email protected]> --- 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() _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
