Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

81.3. lldb-23.1.2

Debugger from the LLVM project, for C, C++, Rust and Zig

23.1.2-1 · Apache-2.0 WITH LLVM-exception · 17.0 SBU · 141.6 MiB, 759 files · 41_system, 974 of 1047 · ports/core/toolchain/lldb

Homepage: https://lldb.llvm.org/

Why it is in KDOS. The comment above lldb and ispc in script/phases/41_system/packages.d/toolchain.txt:

The debugger Rust and Zig point at; gdb is the C story. Its version is not a free choice — it must equal the llvm and clang the tree already pins, or the plugin ABI does not match.

Depends on: llvm, clang, swig, python3, ncurses, libedit, libxml2, zlib, xz, tree-sitter, python3-sphinx.

Required by (1): kdevelop.

Sources: lldb-23.1.2.tar.xz (170.9 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install lldb'

build.sh:

export TREE_SITTER_JS_RUNTIME=native
cmake -S lldb -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D CMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
	-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
	-D LLVM_DIR=/usr/lib/cmake/llvm \
	-D Clang_DIR=/usr/lib/cmake/clang \
	-D LLVM_ENABLE_RTTI=ON \
	-D LLDB_ENABLE_SWIG=ON \
	-D LLDB_ENABLE_PYTHON=ON \
	-D LLDB_ENABLE_CURSES=ON \
	-D LLDB_ENABLE_LZMA=ON \
	-D LLDB_ENABLE_LIBXML2=ON \
	-D LLDB_ENABLE_LUA=OFF \
	-D LLDB_ENABLE_LIBEDIT=ON \
	-D LLDB_ENABLE_TREESITTER=ON \
	-D LLDB_INCLUDE_TESTS=OFF \
	-D LLVM_INCLUDE_TESTS=OFF \
	-D LLVM_ENABLE_SPHINX=ON \
	-D SPHINX_OUTPUT_HTML=OFF \
	-D SPHINX_OUTPUT_MAN=ON \
	-D SPHINX_WARNINGS_AS_ERRORS=OFF \
	-D LLVM_MAIN_SRC_DIR="$SRC/llvm" \
	-Wno-dev

cmake --build build
DESTDIR=$PKG cmake --install build

cmake --build build --target docs-lldb-man
install -Dm644 build/docs/man/*.1 -t "$PKG/usr/share/man/man1"

Programs: lldb, lldb-argdumper, lldb-dap, lldb-instr, lldb-mcp, lldb-server, yaml2macho-core.

Libraries: liblldb.so, liblldbIntelFeatures.so.

Directories: /usr/include/lldb, /usr/lib/python3.14/site-packages/lldb, /usr/share/licenses/lldb.