[Lldb-commits] [PATCH] D61877: [CMake] Add error to clarify that lldb requires libcxx
Phabricator via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 15 01:57:33 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL360756: [CMake] Add error to clarify that lldb requires libcxx (authored by stefan.graenitz, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D61877?vs=199394&id=199564#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61877/new/
https://reviews.llvm.org/D61877
Files:
lldb/trunk/CMakeLists.txt
lldb/trunk/docs/resources/build.rst
Index: lldb/trunk/docs/resources/build.rst
===================================================================
--- lldb/trunk/docs/resources/build.rst
+++ lldb/trunk/docs/resources/build.rst
@@ -151,6 +151,12 @@
LLVM, then you can pass LLVM-specific CMake variables to cmake when building
LLDB.
+If you are building both Clang and LLDB together, be sure to also add libc++,
+which is currently required for testing on macOS:
+
+::
+
+ > cmake -D LLVM_ENABLE_PROJECTS='clang;lldb;libcxx' $PATH_TO_LLVM -G Ninja
Here are some commonly used LLDB-specific CMake variables:
Index: lldb/trunk/CMakeLists.txt
===================================================================
--- lldb/trunk/CMakeLists.txt
+++ lldb/trunk/CMakeLists.txt
@@ -124,6 +124,24 @@
message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
endif()
else()
+ # We require libcxx for the test suite, so if we aren't building it,
+ # try to provide a helpful error about how to resolve the situation.
+ if(NOT TARGET cxx)
+ if(LLVM_ENABLE_PROJECTS STREQUAL "")
+ # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
+ # using the old layout), suggest checking it out.
+ message(FATAL_ERROR
+ "LLDB test suite requires libc++, but it is currently disabled. "
+ "Please checkout `libcxx` in `llvm/projects` or disable tests "
+ "via `LLDB_INCLUDE_TESTS=OFF`.")
+ else()
+ # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it.
+ message(FATAL_ERROR
+ "LLDB test suite requires libc++, but it is currently disabled. "
+ "Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests "
+ "via `LLDB_INCLUDE_TESTS=OFF`.")
+ endif()
+ endif()
list(APPEND LLDB_TEST_DEPS cxx)
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61877.199564.patch
Type: text/x-patch
Size: 1981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190515/8f7a3f41/attachment.bin>
More information about the lldb-commits
mailing list