Skip to content

Commit

Permalink
[CMake] Quick-Fix targets don't exist when building against LLVM inst…
Browse files Browse the repository at this point in the history
…all-tree with LLDB_INCLUDE_TESTS=ON

The issue came up during release testing for LLVM 8: https://bugs.llvm.org/show_bug.cgi?id=40443

Differential Revision: https://reviews.llvm.org/D57233

llvm-svn: 352382
  • Loading branch information
weliveindetail committed Jan 28, 2019
1 parent 6163039 commit a50cce2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lldb/cmake/modules/AddLLDB.cmake
Expand Up @@ -88,7 +88,9 @@ function(add_lldb_library name)
# Hack: only some LLDB libraries depend on the clang autogenerated headers,
# but it is simple enough to make all of LLDB depend on some of those
# headers without negatively impacting much of anything.
add_dependencies(${name} clang-tablegen-targets)
if(NOT LLDB_BUILT_STANDALONE)
add_dependencies(${name} clang-tablegen-targets)
endif()

# Add in any extra C++ compilation flags for this library.
target_compile_options(${name} PRIVATE ${PARAM_EXTRA_CXXFLAGS})
Expand Down
11 changes: 8 additions & 3 deletions lldb/lit/CMakeLists.txt
Expand Up @@ -26,9 +26,6 @@ list(APPEND LLDB_TEST_DEPS
llvm-config
llvm-mc
llvm-objcopy
FileCheck
count
not
)

if(TARGET lld)
Expand All @@ -55,6 +52,14 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Suite/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Suite/lit.site.cfg)

if(NOT LLDB_BUILT_STANDALONE)
list(APPEND LLDB_TEST_DEPS
FileCheck
count
not
)
endif()

add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${LLDB_TEST_DEPS}
Expand Down

0 comments on commit a50cce2

Please sign in to comment.