Building and Installing Polly


There is a script available to automatically checkout, update, build, and test Polly. This script contains all the commands that are subsequently described on this webpage. The automatic installation consists of four simple steps:
mkdir polly && cd polly
chmod +x


Get the code

Warning: Polly/LLVM/clang need to be checked out at the same time.

git clone llvm_git
git clone llvm_git/tools/polly

# Also build the matching clang-version (optional)
git clone llvm_git/tools/clang

Build Polly

mkdir llvm_build && cd llvm_build
cmake ../llvm_git && make

Test Polly

make check-polly


If you get an error in one of the python files, your system probably uses python3 as default python interpreter. This is the case, for instance, under Arch Linux. To solve this issue, run cmake again, but with the added argument: -DPYTHON_EXECUTABLE=/usr/bin/python2 (replace /usr/bin/python2 with the location of the python2 interpreter under your system).