Author: cbieneman
Date: Thu Sep 22 16:08:27 2016
New Revision: 282196

URL: http://llvm.org/viewvc/llvm-project?rev=282196&view=rev
Log:
[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.

Modified:
    lldb/trunk/cmake/modules/AddLLDB.cmake

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=282196&r1=282195&r2=282196&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Thu Sep 22 16:08:27 2016
@@ -91,7 +91,10 @@ macro(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} libclang)
+  get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
+  if(CLANG_TABLEGEN_TARGETS)
+    add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})
+  endif()
 
   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
 endmacro(add_lldb_library)


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to