[lldb][cmake] Remove libclang as an lldbBase dependency (NFCI)
authorVedant Kumar <vsk@apple.com>
Fri, 19 Aug 2016 18:41:50 +0000 (18:41 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 19 Aug 2016 18:41:50 +0000 (18:41 +0000)
It's pulling in all kinds of things it doesn't need (e.g, clang-tidy!).

Eliminating this dependency removes 1056 dependencies from the
'CommandObjectFrame.cpp.o' target and 454 dependencies from the 'lldb'
target. On my machine, this shaves 7 minutes off of a clean build of
lldb.

Thanks to Zachary Turner for pointing out some issues with an earlier
version of this patch!

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

llvm-svn: 279296

lldb/CMakeLists.txt
lldb/cmake/modules/AddLLDB.cmake

index e092e0b..a8c817e 100644 (file)
@@ -1,5 +1,6 @@
 cmake_minimum_required(VERSION 3.4.3)
 
+include(cmake/LLDBDependencies.cmake)
 include(cmake/modules/LLDBStandalone.cmake)
 include(cmake/modules/LLDBConfig.cmake)
 include(cmake/modules/AddLLDB.cmake)
index cf27729..fb7a8f3 100644 (file)
@@ -84,10 +84,7 @@ macro(add_lldb_library name)
     endif()
   endif()
 
-  # 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)
+  add_dependencies(${name} ${CLANG_USED_LIBS})
 
   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
 endmacro(add_lldb_library)