You are here

Cling Build Instructions

Building from source

Build script

You can download and run this build script.

Manual build

Alternatively, you can build manually. Start by checking out llvm, clang and cling:

git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches
Now follow the procedure described at the clang web page for ./configure --enable-cxx11; make- or CMake-based build instructions. Don't forget to make install. You will get a binary called cling: that's your interactive C++ interpreter!

Building with CMake (e.g. on Windows)

As previously described, clone llvm, clang, and cling:
git clone http://root.cern.ch/git/llvm.git src
cd src
git checkout cling-patches
cd tools
git clone http://root.cern.ch/git/cling.git
git clone http://root.cern.ch/git/clang.git
cd clang
git checkout cling-patches
cd ..
Then use CMake to configure & build cling:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=[Install Path] ..\src
cmake --build . --config [Release/Debug] --target clang
cmake --build . --config [Release/Debug] --target cling

Building ROOT6: cling as part of ROOT

Cling, llvm and clang are part of the trunk of ROOT. Simply run

git clone https://root.cern.ch/git/root.git src
mkdir obj
cd obj
../src/configure
make -j4
and you will get a preview of ROOT 6: ROOT using cling!