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

2016-09-23 Thread Zachary Turner via lldb-commits
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.

On Thu, Sep 22, 2016 at 2:25 PM Chris Bieneman  wrote:

> 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  wrote:
>
> Ok, cool!
>
> On Thu, Sep 22, 2016 at 2:23 PM Chris Bieneman  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  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@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=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=282195=282196=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
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


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

2016-09-22 Thread Chris Bieneman via lldb-commits
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  wrote:
> 
> Ok, cool!
> 
> On Thu, Sep 22, 2016 at 2:23 PM Chris Bieneman  > 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 > > 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 
>> > wrote:
>> Author: cbieneman
>> Date: Thu Sep 22 16:08:27 2016
>> New Revision: 282196
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=282196=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=282195=282196=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 
>> 
> 

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


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

2016-09-22 Thread Zachary Turner via lldb-commits
Ok, cool!

On Thu, Sep 22, 2016 at 2:23 PM Chris Bieneman  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  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@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=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=282195=282196=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
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


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

2016-09-22 Thread Chris Bieneman via lldb-commits
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  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 
> > wrote:
> Author: cbieneman
> Date: Thu Sep 22 16:08:27 2016
> New Revision: 282196
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=282196=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=282195=282196=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 
> 

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


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

2016-09-22 Thread Zachary Turner via lldb-commits
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@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=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=282195=282196=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
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits