[Lldb-commits] [lldb] r282196 - [CMake] Fixing a small hack in add_lldb_library

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 22 14:25:52 PDT 2016


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.

That same concern came up in a similar patch I submitted to Swift.

-Chris

> On Sep 22, 2016, at 2:23 PM, Zachary Turner <zturner at google.com> wrote:
> 
> Ok, cool!
> 
> On Thu, Sep 22, 2016 at 2:23 PM Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote:
> 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.
> 
> -Chris
> 
>> On Sep 22, 2016, at 2:21 PM, Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
>> 
>> At the end of the day though, lldb DOES need to link against libclang.  Is it still doing this?
>> 
>> 
>> On Thu, Sep 22, 2016 at 2:17 PM Chris Bieneman via lldb-commits <lldb-commits at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>> wrote:
>> Author: cbieneman
>> Date: Thu Sep 22 16:08:27 2016
>> New Revision: 282196
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=282196&view=rev <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 <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 at lists.llvm.org <mailto:lldb-commits at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160922/d8fd6a84/attachment.html>


More information about the lldb-commits mailing list