forked from OSchip/llvm-project
[CMake] Fix standalone builds: workaround the cxx target not getting imported yet (unlike clang target)
Summary: Handle standalone builds separately and print a warning if we have no libcxx. Reviewers: aprantl, JDevlieghere Reviewed By: JDevlieghere Subscribers: mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D56399 llvm-svn: 350737
This commit is contained in:
parent
ea443cf828
commit
644a3289e7
|
@ -101,10 +101,22 @@ if(LLDB_INCLUDE_TESTS)
|
||||||
list(APPEND LLDB_TEST_DEPS liblldb)
|
list(APPEND LLDB_TEST_DEPS liblldb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Add dependencies if we test with the in-tree clang.
|
||||||
|
# This works with standalone builds as they import the clang target.
|
||||||
if(TARGET clang)
|
if(TARGET clang)
|
||||||
list(APPEND LLDB_TEST_DEPS clang)
|
list(APPEND LLDB_TEST_DEPS clang)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND LLDB_TEST_DEPS cxx)
|
# If we build clang, we should build libcxx.
|
||||||
|
# FIXME: Standalone builds should import the cxx target as well.
|
||||||
|
if(LLDB_BUILT_STANDALONE)
|
||||||
|
# For now check that the include directory exists.
|
||||||
|
set(cxx_dir "${LLVM_DIR}/../../../include/c++")
|
||||||
|
if(NOT EXISTS ${cxx_dir})
|
||||||
|
message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND LLDB_TEST_DEPS cxx)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
<li>In Xcode 4.x: <b>lldb/lldb.xcworkspace</b>, select the <b>lldb-tool</b> scheme, and build.</li>
|
<li>In Xcode 4.x: <b>lldb/lldb.xcworkspace</b>, select the <b>lldb-tool</b> scheme, and build.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Building LLDB with CMake</h2>
|
<h2>Building LLDB with CMake</h2>
|
||||||
<p> First download the LLVM, Clang, and LLDB sources. Refer to <a href="source.html">this page</a> for precise instructions on this step.</p>
|
<p> First download the LLVM, Clang, libc++ and LLDB sources. Refer to <a href="source.html">this page</a> for precise instructions on this step.</p>
|
||||||
<p> Refer to the code signing instructions in <b>lldb/docs/code-signing.txt</b> for info on codesigning debugserver during the build.</p>
|
<p> Refer to the code signing instructions in <b>lldb/docs/code-signing.txt</b> for info on codesigning debugserver during the build.</p>
|
||||||
<p> Using CMake is documented on the <a href="http://llvm.org/docs/CMake.html">Building LLVM with CMake</a> page.
|
<p> Using CMake is documented on the <a href="http://llvm.org/docs/CMake.html">Building LLVM with CMake</a> page.
|
||||||
Ninja is the recommended generator to use when building LLDB with CMake.</p>
|
Ninja is the recommended generator to use when building LLDB with CMake.</p>
|
||||||
|
|
Loading…
Reference in New Issue