[lldb] Add lldb-server targets to build docs

The current doc has people just do "ninja lldb" which is
not incorrect, it does build lldb. However it does not build lldb-server.
So you can't just "lldb some-binary" and expect it to work.

I've updated the instructions to reflect that most of the time
you'll want both lldb and lldb-server.

Though there is a use case for building just lldb. I'm assuming
Mac OS (where you have debugserver) and if you only wanted to do
remote debug.

Fixes #59575

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D140385
This commit is contained in:
David Spickett 2022-12-20 11:31:58 +00:00
parent bb1b0e61cd
commit 3fa023970d

View File

@ -169,8 +169,15 @@ We used the ``LLVM_ENABLE_PROJECTS`` option here to tell the build-system which
subprojects to build in addition to LLVM (for more options see
:ref:`CommonCMakeOptions` and :ref:`CMakeCaches`). Parts of the LLDB test suite
require ``lld``. Add it to the list in order to run all tests. Once CMake is done,
run ninja to perform the actual build. We pass ``lldb`` here as the target, so
it only builds what is necessary to run the lldb driver:
run ninja to perform the actual build.
::
$ ninja lldb lldb-server
If you only want lldb, or are on a platform where lldb-server is not supported,
you can pass just ``lldb``. Ninja will only build what is necessary to run the
lldb driver:
::
@ -210,7 +217,10 @@ build directory for Clang, remember to pass its module path via ``Clang_DIR``
$ cmake -B /path/to/lldb-build -G Ninja \
-DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
[<more cmake options>] /path/to/llvm-project/lldb
$ ninja lldb
$ ninja lldb lldb-server
If you do not require or cannot build ``lldb-server`` on your platform, simply
remove it from the Ninja command.
.. note::