[Lldb-commits] [PATCH] D47801: Make lldb tools dependent on liblldb target when building LLDB.framework with CMake
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 6 11:50:55 PDT 2018
labath added a comment.
In https://reviews.llvm.org/D47801#1123895, @xiaobai wrote:
> > - rename INCLUDE_IN_FRAMEWORK to something more neutral (USED_BY_LIBLLDB or whatever)
> > - make the liblldb -> tool dependency not conditioned by LLDB_BUILD_FRAMEWORK
> > - remove the lldb->tool dependencies altogether
> > WDYT?
> I think that this a good short-term solution. My concern is your suggestion doesn't reflect the actual dependencies, but conveniently errs on the side of "build it if we think we might need it". I'm not against your suggestion, but I'd like to see if we can come up with something better.
> One idea I had was to introduce another target for the framwork itself, e.g. lldbFramework, which gets built if LLDB_BUILD_FRAMEWORK is set. It would depend on liblldb and all the necessary tools, headers, etc, that the framework would need. That way liblldb can depend only on what it needs to build instead of treating it as both the library and the entire framework. How do you feel about this?
It all comes down to how do you want to view the "liblldb" cmake target. Whether it is just "things that are needed to build liblldb.so binary itself", or whether "everything needed to make liblldb functional". In the second POV, it is natural to have liblldb depend on lldb-server, since lldb-server is necessary to have a fully functional liblldb. However, I can see reasons against that too, so I am fine with your proposed solution.
The thing I would suggest, if it is not too much trouble, is again to make the new target framework-agnostic. I.e., in a LLDB_BUILD_FRAMEWORK build, it would build everything that goes into a framework and package it. Otherwise, it would just be a convenient way to refer to liblldb and everything that is needed to make it functional. The reason I'm suggesting that is that then we could remove the additional dependency management when building lldb driver by just making the driver depend on this new target.
More information about the lldb-commits