[Lldb-commits] [lldb] [lldb-dap] Require LLVM thread support (PR #223604)

Anutosh Bhat via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 14 22:49:09 PDT 2026


https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/223604

Part of #223598. Discvoered this while working on [WasmBolt](https://github.com/anutosh491/WasmBolt)

`lldb-dap` unconditionally creates an event thread when initializing a debugger, but its CMake target is currently generated even when LLVM is configured with `LLVM_ENABLE_THREADS=OFF`.

This produces an `lldb-dap` executable that can be built but cannot actually start a debugging session. I encountered this while building LLDB with Emscripten, although the configuration issue is platform-independent.

This patch only adds the `lldb-dap` subdirectory when LLVM thread support is enabled.

>From 352b4412a868a95d545badcd6f09421773746667 Mon Sep 17 00:00:00 2001
From: anutosh491 <andersonbhat491 at gmail.com>
Date: Tue, 15 Sep 2026 11:17:11 +0530
Subject: [PATCH] [lldb-dap] Require LLVM thread support

---
 lldb/tools/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lldb/tools/CMakeLists.txt b/lldb/tools/CMakeLists.txt
index d02a814f7383f..0323511173c93 100644
--- a/lldb/tools/CMakeLists.txt
+++ b/lldb/tools/CMakeLists.txt
@@ -9,7 +9,9 @@ add_subdirectory(lldb-test EXCLUDE_FROM_ALL)
 add_subdirectory(lldb-fuzzer EXCLUDE_FROM_ALL)
 
 add_lldb_tool_subdirectory(lldb-instr)
-add_lldb_tool_subdirectory(lldb-dap)
+if(LLVM_ENABLE_THREADS)
+  add_lldb_tool_subdirectory(lldb-dap)
+endif()
 add_lldb_tool_subdirectory(lldb-mcp)
 
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")



More information about the lldb-commits mailing list