diff --git a/polly/www/get_started.html b/polly/www/get_started.html --- a/polly/www/get_started.html +++ b/polly/www/get_started.html @@ -15,60 +15,51 @@

Building and Installing Polly

+You can build Polly with Ninja or cmake. +Other generators build systems can also be used, but are not supported. -

Automatic

- -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: +

Get the code

-mkdir polly && cd polly
-wget https://polly.llvm.org/polly.sh
-chmod +x polly.sh
-./polly.sh
+git clone https://github.com/llvm/llvm-project.git
 
-

Manual

-

Get the code

+You can also get a shallow clone by running:
-git clone https://github.com/llvm/llvm-project.git llvm_git
+git clone --depth 1 https://github.com/llvm/llvm-project.git
 
-

Build Polly

+ +

Build Polly (with Ninja)

-mkdir llvm_build && cd llvm_build
-cmake -DLLVM_ENABLE_PROJECTS='polly;clang' ../llvm_git/llvm && make
+mkdir build && cd build
+cmake -G Ninja '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
+ninja
 
-

Test Polly

+

Build Polly (with cmake)

-
make check-polly
- -

Building Polly Without LLVM

-It is also possible to build Polly without -also building LLVM. All you need is an installed version of LLVM or a previous -build. To configure Polly to use a pre-built LLVM, set the --DCMAKE_PREFIX_PATH option: +
+mkdir build && cd build
+cmake '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
+cmake --build .
+
-
cmake -DCMAKE_PREFIX_PATH=${LLVM_PREFIX}/lib/cmake/llvm ../llvm_git/polly
+

Test Polly (with Ninja)

-To run unittests, however, you need to have the LLVM source directory around. -Polly will use the llvm-config of the LLVM you're building against -to guess the location of the source directory. You may override autodetected -location by setting the -DLLVM_SOURCE_ROOT option. +
ninja check Polly

Troubleshooting

-

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). +

+ If you run out of memory when building, lower the concurrency of Ninja (e.g. ninja -j 2 ). + More tips and tricks to building and using LLVM can be found here. +

-
cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} -DPYTHON_EXECUTABLE=/usr/bin/python2 ${LLVM_SRC}
+

+For more information on getting started with Polly and LLVM in general, see LLVM's getting started docs. +

diff --git a/polly/www/polly.sh b/polly/www/polly.sh deleted file mode 100644 --- a/polly/www/polly.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -xe - -export BASE=`pwd` -export LLVM_SRC=${BASE}/llvm -export POLLY_SRC=${LLVM_SRC}/tools/polly -export CLANG_SRC=${LLVM_SRC}/tools/clang -export LLVM_BUILD=${BASE}/llvm_build - -if [ -e /proc/cpuinfo ]; then - procs=`cat /proc/cpuinfo | grep processor | wc -l` -else - procs=1 -fi - -if ! test -d ${LLVM_SRC}; then - git clone http://llvm.org/git/llvm.git ${LLVM_SRC} -fi - -if ! test -d ${POLLY_SRC}; then - git clone http://llvm.org/git/polly.git ${POLLY_SRC} -fi - -if ! test -d ${CLANG_SRC}; then - git clone http://llvm.org/git/clang.git ${CLANG_SRC} -fi - -mkdir -p ${LLVM_BUILD} -cd ${LLVM_BUILD} - -cmake ${LLVM_SRC} -make -j$procs -l$procs -make check-polly