[Lldb-commits] [lldb] [lldb][docs] Update standlone build instructions (PR #192613)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 17 04:15:03 PDT 2026
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/192613
>From 658550d8b1f25344ccf68ac7ab7664e2d04540d0 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Fri, 17 Apr 2026 08:36:32 +0000
Subject: [PATCH 1/2] [lldb][docs] Update standlone build instructions
* LLVM requires CMake 3.20 (https://llvm.org/docs/GettingStarted.html#software)
so we do not need to mention 3.14 anymore.
* CMAKE_BUILD_TYPE was listed twice in one command.
* "ninja" only works when in the build directory, so I have
changed that to "cmake --build" instead.
---
lldb/docs/resources/build.rst | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 567afdb969063..aeba5cb5f8efb 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -217,18 +217,17 @@ checked out above, but now we will have multiple build-trees:
single one in ``/path/to/llvm-build``
Run CMake with ``-B`` pointing to a new directory for the provided
-build-tree\ :sup:`1` and the positional argument pointing to the ``llvm``
-directory in the source-tree.\ :sup:`2` Note that we leave out LLDB here and only include
-Clang. Then we build the ``ALL`` target with ninja:
+build-tree and the positional argument pointing to the ``llvm``
+directory in the source-tree.\ :sup:`1` Note that we leave out LLDB here and only include
+Clang. Then we build the ``ALL`` target:
::
$ cmake -B /path/to/llvm-build -G Ninja \
-DCMAKE_BUILD_TYPE=[<build type>] \
-DLLVM_ENABLE_PROJECTS=clang \
- -DCMAKE_BUILD_TYPE=Release \
[<more cmake options>] /path/to/llvm-project/llvm
- $ ninja
+ $ cmake --build /path/to/llvm-build
Now run CMake a second time with ``-B`` pointing to a new directory for the
main build-tree and the positional argument pointing to the ``lldb`` directory
@@ -240,19 +239,16 @@ build directory for Clang, remember to pass its module path via ``Clang_DIR``
::
$ cmake -B /path/to/lldb-build -G Ninja \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=[<build type>] \
-DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
[<more cmake options>] /path/to/llvm-project/lldb
- $ ninja lldb lldb-server
+ $ cmake --build /path/to/lldb-build lldb lldb-server
If you do not require or cannot build ``lldb-server`` on your platform, simply
remove it from the Ninja command.
.. note::
- #. The ``-B`` argument was undocumented for a while and is only officially
- supported since `CMake version 3.14
- <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_
#. If you want to have a standalone LLDB build with tests enabled, you also
need to pass in ``-DLLVM_ENABLE_RUNTIME='libcxx;libcxxabi;libunwind'`` to your CMake invocation when configuring your LLVM standalone build.
>From 20c9759e1a4b559294c4bec3dab9ae5a80677836 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Fri, 17 Apr 2026 11:13:49 +0000
Subject: [PATCH 2/2] missing option
---
lldb/docs/resources/build.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index aeba5cb5f8efb..85a7b701219a9 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -242,7 +242,7 @@ build directory for Clang, remember to pass its module path via ``Clang_DIR``
-DCMAKE_BUILD_TYPE=[<build type>] \
-DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
[<more cmake options>] /path/to/llvm-project/lldb
- $ cmake --build /path/to/lldb-build lldb lldb-server
+ $ cmake --build /path/to/lldb-build -t lldb lldb-server
If you do not require or cannot build ``lldb-server`` on your platform, simply
remove it from the Ninja command.
More information about the lldb-commits
mailing list