Cling Build Instructions

Building LLVM + clang

Follow the procedure at the clang web page to check out the trunk of LLVM and clang from their subversion repositories.

If you want to get cling as part of ROOT, jump to "Building cling within ROOT".

Building cling within LLVM and clang instead of ROOT

If you don't care about ROOT, check out cling right next to clang, i.e. into the tools/ subdirectory. Get it from here:
cd tools/clang/.. # i.e. next to clang
svn co https://root.cern.ch/svn/root/trunk/cint/cling
cd ..
cat tools/cling/patches/*.diff | patch -p0
The patches are only for the build system; cling now builds on top of an unmodified clang / llvm. Now follow the clang web page again for ./configure; make-based build instructions, and don't forget to make install. You will get a binary called cling: that's your interactive C++ interpreter!

Building cling within ROOT

If you want to see how ROOT behaves with cling then - after building llvm and clang - check ROOT out and run

./configure --build=debug --with-llvm-config=<i>/wherever/you/installed/LLVM</i>/bin --enable-cling
make
When you now start ROOT you will talk to cling at the prompt!