Skip to content

Commit 7176862

Browse files
author
Chris Bieneman
committed
[CMake] Fixing a small hack in add_lldb_library
This code was adding an explicit dependency on libclang because lldb needs clang headers, changing this to instead depend on the clang tablegen targets means we don't have to depend on building the clang bits in libclang that lldb doesn't need. Note this is still a bit of a hack because we're adding the dependency to all lldb libraries, instead of just the ones that need it. llvm-svn: 282196
1 parent 7060243 commit 7176862

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/cmake/modules/AddLLDB.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ macro(add_lldb_library name)
9191
# Hack: only some LLDB libraries depend on the clang autogenerated headers,
9292
# but it is simple enough to make all of LLDB depend on some of those
9393
# headers without negatively impacting much of anything.
94-
add_dependencies(${name} libclang)
94+
get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
95+
if(CLANG_TABLEGEN_TARGETS)
96+
add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})
97+
endif()
9598

9699
set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
97100
endmacro(add_lldb_library)

0 commit comments

Comments
 (0)