[lldb-dev] Exclusively build and install LLDB?

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Mon Nov 23 01:28:28 PST 2015

I believe that for purposes of building distribution packages you
should use the out-of-tree mode of building lldb. This means, you
build llvm and clang separately, and then point your LLDB build to
their installation path with LLDB_PATH_TO_LLVM_BUILD and
LLDB_PATH_TO_CLANG_BUILD variables. This way you can avoid building
llvm/clang twice, you can have a separate package for each logical
component of llvm and you can make lldb optional for your users (e.g.
have only clang installed normally, if user chooses to install lldb,
it will automatically pull in clang if needed). In this mode "make
install" should install only the lldb components, which should be
correctly linked to the already-installed llvm libraries.

That said, I can't guarantee that this mode will work for you
out-of-the-box. We occasionally get patches to fix it up, but I don't
know anyone who is using it extensively. However, I think this would
be the best way forward for you and I'm prepared yo help you out if
you choose to go that way.

What do you think about that?


On 23 November 2015 at 05:12, Kamil Rytarowski via lldb-dev
<lldb-dev at lists.llvm.org> wrote:
> Hash: SHA256
> On 23.11.2015 05:19, Zachary Turner wrote:
>> LLDB links against clang and llvm.  How would an lldb-only target
>> work? i.e. how would you build lldb without first building clang
>> and llvm? Unless I'm misunderstanding the purpose of your
>> question:
> I don't want to build the following executables (among others):
> bin/clang
> bin/clang++
> bin/clang-3.8
> bin/clang-check
> bin/clang-cl
> bin/clang-format
> bin/git-clang-format
> I've found that to some extend I can emulate it with:
> ninja/make lldb lldb-mi
> I would like to have a target lldb-only, building all LLDB targets
> needed to install the full distribution and to perform builtin tests.
>> As for the install, are you saying that running "ninja install"
>> does not install lldb?  If so that's a bug and shoudl be fixed in
>> the CMake.
> ninja/make install does its job installing LLDB properly.
> My complain is that it's not possible (to my knowledge) to stop
> installing Clang and LLVM sets.
> I don't want to populate my system with the following example files:
> bin/clang*
> bin/llvm*
> include/clang-c/
> include/clang/
> include/llvm/
> Another good reason, besides time and space optimization is that among
> others pkgsrc isn't designed to produce multiple packages from a
> single meta-file (in a format of BSD Makefile in pkgsrc) with rules
> specified to build a piece of software.
> It's convenient to users to ship with separated prebuilt packages with
> Clang, LLVM, LLDB etc. For now users who installed Clang from pkgsrc
> won't be able to install LLDB from pkgsrc-wip (containing prebuilt
> package with LLDB from HEAD/master/trunk of the debugger).
> For now there seems to be need to go for walk-around similar to
> ArchLinux [1]:
> https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lldb-svn
> Additionally I've optimized my build with
> - -DLLVM_TARGETS_TO_BUILD="X86" and it significantly reduced the
> resource usage! I will happily accept more suggestions how to tune it
> further.
> My current Makefile is here:
> http://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=blob_plain;f
> =lldb-git/Makefile
> GH mirror:
> https://github.com/NetBSD/pkgsrc-wip/blob/master/lldb-git/Makefile
> Thanks!
>> On Sun, Nov 22, 2015 at 5:44 PM Kamil Rytarowski via lldb-dev
>> <lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>> wrote:
>> Are there plans to add new target: lldb-only and lldb-install?
>> There are already similar targets for Clang.
>> I'm debugging LLDB on NetBSD and I'm having very bad time building
>> everything with debug symbols. There is also popular request from
>> NetBSD users to just install lldb without conflicting with Clang
>> and LLV M.
>> I was looking at Open Source distributions with a LLDB package,
>> for example ArchLinux is manually copying files from the build...
>> I would like to skip building unnecessary parts and then focus on
>> installing only the LLDB package... otherwise I need 64GB of
>> RAM+storage and a lot of time to produce new package.
>> _______________________________________________ lldb-dev mailing
>> list lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> Version: GnuPG v2
> tvnnZp5WafPMmE2cp61oiivBO0PWBrG8aMeZelRZMPZPRhlvGIUYtwCe1W1CeeFq
> QurYR7JwDcMA5fiVCmaqqToDQ3ki9J3fCmjvAnAKIHcq4+baXNDQOm2O3NvBBPNL
> YHn2ZsKBWdZgIRvVYKx6o35zQYBOSgKqfPycvg7h+Nqvvb82MJIBmpb21SAHlbEz
> hwBC/A2GxI399zxxb1vxicS8Fo7OUHx7pont6Er9mcPjLWvkRbahIWiPwysNR1is
> I6HcRgyGSbbEMfuAbhZ16yHvq3Si79Si/O1DteJYF7+lrRdHqmStrQexPnx1E0zl
> u1BrHWUiEkZq5dFHDID/30DQULF1baNq9/qmrVacChJluJlVMIyQwZz8GCXU0RXZ
> cDwnmYSOxstUKWSeL7IvQ3aFMe0WCGXoeSQ0dH/JM0n8CKyVm2XWCAeYuGek7gor
> BIzqIvE3AWll7+8lB7ehFKb0qRfFk1/wbriCcQNQxr92PCOFGAvy9GdD/o1NRFil
> RuWSnJ9XOuhQ9oh9cwCWZqQ0oatX2HtXHNweRhpkLZLEFKYGA3tSyEse7ExQkcf7
> qdAWK8i2uRDxsp/dfUEiMmZ+oqVOBPJ8WSC3ydurnr4eGqagf87/8XV+2u5XP1o5
> sI2nL4XzxzcV4aMfzeIK
> =BuOP
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list