0

I'm starting to work with llvm infrastructure, and i'm interested in the use of the debugger tool lldb instead of default gdb. I followed the tutorial of installation of clang (Linux System, through svn options) and now wanted to know if is possible to install lldb only, instead of rebuild the whole structure of llvm. I don't found a especific documentation for that and i don't know any especific forum for llvm, so if anyone know some forum of llvm,

Sorry about my english, i'm a brazilian developer.

Natanael Ramos
  • 340
  • 3
  • 10
  • If you are on debian/ubuntu, you might be interested in http://llvm.org/apt/ – Hongxu Chen Feb 23 '15 at 03:37
  • I already see this article @HongxuChen, isn't exactly what i'm looking for, because i already have installed the binaries for **llvm** and **clang** with the most recent versions of **svn** repositories. If i follow these steps, probably the binaries will be replaced by older versions (stable). – Natanael Ramos Feb 23 '15 at 19:20

1 Answers1

0

I actually found the solution yesterday, but was not sure how the policies to answer your own questions work here, but according to this it's allright. :)

In fact, it is quite simple.

First, you must identify the directory 'src-root' of the installation of the tools llvm/clang using the command 'llvm-config':

llvm-config --src-root

Once you find the directory, you must navigate to the path $src-root/tools and checkout the lldb:

svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb

The next step is go to the build directory, if the steps of the tutorial has been followed, is just necessary to clean the build directory:

rm -rf *

Now, is the step of building the lldb, I personally have used the autoconf options (classical configure make && make install), but cmake can be used as well. When the configure script runs, the binaries of llvm and clang already installed will be detected, avoiding rebuild the whole structure of llvm/clang.

The parameters of the configure script can be changed, I use as follow because I intend to use the llvm libraries:

../llvm/configure --enable-optimized --enable-assertions --enable-shared --enable-targets=host

Then:

make -j4
sudo make install

where -j4 option is the number of threads (jobs) to be created.

Reference: http://www.felixmorgner.ch/en/blog/building-clang-lldb-and-libc-on-ubuntu/

Community
  • 1
  • 1
Natanael Ramos
  • 340
  • 3
  • 10