summaryrefslogtreecommitdiffstats
path: root/lldb/docs
diff options
context:
space:
mode:
authorStefan Granitz <stefan.graenitz@gmail.com>2019-09-18 10:20:28 +0000
committerStefan Granitz <stefan.graenitz@gmail.com>2019-09-18 10:20:28 +0000
commita206de8a0e6a657b5c5a48e894383590ef942fc7 (patch)
tree3adda26e996386b128386b3491f6717f3bae0a50 /lldb/docs
parenta84b200e6048211ae74c511a1660fb2c2c5567da (diff)
downloadbcm5719-llvm-a206de8a0e6a657b5c5a48e894383590ef942fc7.tar.gz
bcm5719-llvm-a206de8a0e6a657b5c5a48e894383590ef942fc7.zip
[lldb][CMake] Infer `Clang_DIR` if not passed explicitly
Summary: If we only get `LLVM_DIR` and find Clang in the same provided build-tree, automatically infer `Clang_DIR` like this: ``` LLVM_DIR = /path/to/build-llvm/lib/cmake/llvm Clang_DIR = /paht/to/build-llvm/lib/cmake/clang ``` Reviewers: JDevlieghere, jingham, xiaobai, compnerd, labath Reviewed By: JDevlieghere, labath Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65798 llvm-svn: 372210
Diffstat (limited to 'lldb/docs')
-rw-r--r--lldb/docs/resources/build.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 62981e0f233..f0a5273cb87 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -120,10 +120,11 @@ Standalone builds
*****************
This is another way to build LLDB. We can use the same source-tree as we
-checked out above, but now we will have two build-trees:
+checked out above, but now we will have multiple build-trees:
* the main build-tree for LLDB in ``/path/to/lldb-build``
-* a provided build-tree for LLVM and Clang in ``/path/to/llvm-build``
+* one or more provided build-trees for LLVM and Clang; for simplicity we use a
+ 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``
@@ -139,15 +140,15 @@ Clang. Then we build the ``ALL`` target with ninja:
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
-in the source-tree. In order to find the provided build-tree, the build-system
-needs the options ``LLVM_DIR`` and ``Clang_DIR`` (CMake variables are
-case-sensitive!):
+in the source-tree. In order to find the provided build-tree, the build system
+looks for the path to its CMake modules in ``LLVM_DIR``. If you use a separate
+build directory for Clang, remember to pass its module path via ``Clang_DIR``
+(CMake variables are case-sensitive!):
::
> cmake -B /path/to/lldb-build -G Ninja \
-DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
- -DClang_DIR=/path/to/llvm-build/lib/cmake/clang \
[<more cmake options>] /path/to/llvm-project/lldb
> ninja lldb
@@ -320,7 +321,6 @@ Build LLDB standalone for development with Xcode:
> cmake -B /path/to/lldb-build \
-C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake \
-DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
- -DClang_DIR=/path/to/llvm-build/lib/cmake/clang \
llvm-project/lldb
> open lldb.xcodeproj
> cmake --build /path/to/lldb-build --target check-lldb
OpenPOWER on IntegriCloud