Natanael Ramos
Natanael Ramos

Reputation: 450

Install lldb only in llvm

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.

Upvotes: 0

Views: 1294

Answers (1)

Natanael Ramos
Natanael Ramos

Reputation: 450

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/

Upvotes: 0

Related Questions