<div dir="ltr">BTW, a TON of unnecessary stuff currently depends on the clang tablegen targets, due to the way the libraries are not well layered.  So you can be trying to build CommandObjectMemory.cpp, and all of a sudden it has to build the clang tablegen targets.  Very frustrating for incremental development.  I expect it's a rather large undertaking, but just an FYI.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 22, 2016 at 2:25 PM Chris Bieneman <<a href="mailto:beanz@apple.com">beanz@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">Also of note. This implementation is “standalone” safe. If LLDB is being built without clang (against a pre-installed clang) CLANG_TABLEGEN_TARGETS will not be set, so no dependency will be setup.<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">That same concern came up in a similar patch I submitted to Swift.<br class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"></div></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-Chris</div></div></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Sep 22, 2016, at 2:23 PM, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:</div><br class="m_4751703671797744255Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Ok, cool!</div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Thu, Sep 22, 2016 at 2:23 PM Chris Bieneman <<a href="mailto:beanz@apple.com" class="gmail_msg" target="_blank">beanz@apple.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">Calls to add_dependencies don’t setup linkage, they just setup build order, so changing this has no impact on what is linked or how.</div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">-Chris</div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Sep 22, 2016, at 2:21 PM, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:</div><br class="gmail_msg m_4751703671797744255m_-4658901603935018729Apple-interchange-newline"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">At the end of the day though, lldb DOES need to link against libclang.  Is it still doing this?<div class="gmail_msg"><br class="gmail_msg"></div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Thu, Sep 22, 2016 at 2:17 PM Chris Bieneman via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br class="gmail_msg">
Date: Thu Sep 22 16:08:27 2016<br class="gmail_msg">
New Revision: 282196<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=282196&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=282196&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
[CMake] Fixing a small hack in add_lldb_library<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
    lldb/trunk/cmake/modules/AddLLDB.cmake<br class="gmail_msg">
<br class="gmail_msg">
Modified: lldb/trunk/cmake/modules/AddLLDB.cmake<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=282196&r1=282195&r2=282196&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=282196&r1=282195&r2=282196&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)<br class="gmail_msg">
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Thu Sep 22 16:08:27 2016<br class="gmail_msg">
@@ -91,7 +91,10 @@ macro(add_lldb_library name)<br class="gmail_msg">
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,<br class="gmail_msg">
   # but it is simple enough to make all of LLDB depend on some of those<br class="gmail_msg">
   # headers without negatively impacting much of anything.<br class="gmail_msg">
-  add_dependencies(${name} libclang)<br class="gmail_msg">
+  get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)<br class="gmail_msg">
+  if(CLANG_TABLEGEN_TARGETS)<br class="gmail_msg">
+    add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})<br class="gmail_msg">
+  endif()<br class="gmail_msg">
<br class="gmail_msg">
   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")<br class="gmail_msg">
 endmacro(add_lldb_library)<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
lldb-commits mailing list<br class="gmail_msg">
<a href="mailto:lldb-commits@lists.llvm.org" class="gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class="gmail_msg">
</blockquote></div>
</div></blockquote></div><br class="gmail_msg"></div></div></blockquote></div>
</div></blockquote></div><br class="gmail_msg"></div></div></div></div></div></blockquote></div>