[Lldb-commits] [PATCH] D25680: [cmake] Make dependencies of lldb libraries private, take 2
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 17 08:28:36 PDT 2016
labath created this revision.
labath added reviewers: zturner, beanz.
labath added a subscriber: lldb-commits.
Herald added subscribers: mgorny, ki.stfu.
The dependencies of our libraries (only liblldb, really) we marked as public, which caused all
their dependencies to be repeated when linking any executables to them. This is a problem because
then all the .a files could end up being linked twice, once to liblldb and once
again to to the executable linking against liblldb (lldb, lldb-mi). As it turns out,
our build actually depends on this behavior:
- on windows, lldb does not have getopt, so it pulls it from inside liblldb, even though getopt is not a part of the exported interface of liblldb (maybe some of the bsd variants have this problem as well)
- lldb-mi uses llvm, which again is not exported by liblldb
This change does not actually fix these problems (that is going to be a hard
one), but it does make them explicit by moving this magic from add_lldb_library
to the places the executable targets are defined. That way, I can link the
additional .a files only on targets that really need it, and the other targets
can build cleanly and make sure we don't regress further. It also fixes the
LLVM_LINK_LLVM_DYLIB build on linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4271 bytes
Desc: not available
More information about the lldb-commits