Cling Build Instructions

Binaries cling

Our nightly binary snapshots are currently not available.

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 -b cling-llvm16 https://github.com/root-project/llvm-project.git src
git clone https://github.com/root-project/cling.git

Then use CMake to configure & build cling:

mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TOOLS=Off -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD="host;NVPTX" src/llvm
cmake --build .
cmake --build . --target install

See also README on the repository.

cling patches?

Cling needs a couple of patches on top of clang (but can work with an original build of llvm). These are the commits that above build instructions correspond to - which is mostly interesting to package maintainers:

Revisions / tags of llvm and clang to build a cling release.
cling release upstream llvm and clang cling-patches on clang
0.5 5.0 release series 287240.. 27d2d5 (aka cling-patches-rrelease_50) 0.7 9.0 release series