2011-05-02 15:48:29 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
|
|
<title>Polly - Getting Started</title>
|
|
|
|
<link type="text/css" rel="stylesheet" href="menu.css" />
|
|
|
|
<link type="text/css" rel="stylesheet" href="content.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2013-12-20 06:50:10 +08:00
|
|
|
<div id="box">
|
2011-05-02 15:48:29 +08:00
|
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
2016-02-04 00:18:24 +08:00
|
|
|
<h1>Building and Installing Polly</h1>
|
2011-05-02 15:48:29 +08:00
|
|
|
|
2012-01-17 22:44:35 +08:00
|
|
|
<h2> Automatic </h2>
|
|
|
|
|
|
|
|
There is a <a href="polly.sh">script</a> 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
|
2012-07-25 00:58:57 +08:00
|
|
|
of four simple steps:
|
2012-01-17 22:44:35 +08:00
|
|
|
|
|
|
|
<pre>
|
2012-07-25 00:58:57 +08:00
|
|
|
mkdir polly && cd polly
|
2019-10-24 07:42:47 +08:00
|
|
|
wget https://polly.llvm.org/polly.sh
|
2012-01-17 22:44:35 +08:00
|
|
|
chmod +x polly.sh
|
|
|
|
./polly.sh
|
|
|
|
</pre>
|
|
|
|
|
2016-02-04 00:18:24 +08:00
|
|
|
<h2> Manual </h2>
|
2015-02-15 19:19:24 +08:00
|
|
|
<h3 id="source"> Get the code </h3>
|
|
|
|
|
|
|
|
<pre>
|
2019-10-24 07:42:47 +08:00
|
|
|
git clone https://github.com/llvm/llvm-project.git llvm_git
|
2015-02-15 19:19:24 +08:00
|
|
|
</pre>
|
|
|
|
<h3 id="build">Build Polly</h3>
|
|
|
|
|
|
|
|
<pre>
|
2016-02-04 00:18:24 +08:00
|
|
|
mkdir llvm_build && cd llvm_build
|
2019-01-30 00:37:27 +08:00
|
|
|
cmake -DLLVM_ENABLE_PROJECTS='polly;clang' ../llvm_git/llvm && make
|
2015-02-15 19:19:24 +08:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
<h3> Test Polly</h3>
|
|
|
|
|
2016-02-04 00:18:24 +08:00
|
|
|
<pre>make check-polly</pre>
|
2011-05-02 15:48:29 +08:00
|
|
|
|
2017-07-12 04:37:28 +08:00
|
|
|
<h3>Building Polly Without LLVM</h3>
|
|
|
|
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
|
|
|
|
<code>-DCMAKE_PREFIX_PATH</code> option:
|
|
|
|
|
2019-01-30 00:37:27 +08:00
|
|
|
<pre>cmake -DCMAKE_PREFIX_PATH=${LLVM_PREFIX}/lib/cmake/llvm ../llvm_git/polly</pre>
|
2017-07-12 04:37:28 +08:00
|
|
|
|
|
|
|
To run unittests, however, you need to have the LLVM source directory around.
|
|
|
|
Polly will use the <code>llvm-config</code> of the LLVM you're building against
|
|
|
|
to guess the location of the source directory. You may override autodetected
|
|
|
|
location by setting the <code>-DLLVM_SOURCE_ROOT</code> option.
|
2011-05-02 15:48:29 +08:00
|
|
|
|
2016-02-04 00:18:24 +08:00
|
|
|
<h3> Troubleshooting</h3>
|
2012-03-30 16:18:19 +08:00
|
|
|
|
2014-04-04 02:12:13 +08:00
|
|
|
<p>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 <code>cmake</code> again, but with the added argument:
|
|
|
|
<code>-DPYTHON_EXECUTABLE=/usr/bin/python2</code> (replace <code>/usr/bin/python2</code>
|
|
|
|
with the location of the python2 interpreter under your system).
|
|
|
|
|
2014-12-03 03:26:58 +08:00
|
|
|
<pre>cmake -DCMAKE_PREFIX_PATH=${ISL_INSTALL} -DPYTHON_EXECUTABLE=/usr/bin/python2 ${LLVM_SRC}</pre>
|
2014-04-04 02:12:13 +08:00
|
|
|
|
2011-05-02 15:48:29 +08:00
|
|
|
</div>
|
2013-12-20 06:50:10 +08:00
|
|
|
</div>
|
2012-01-31 16:50:16 +08:00
|
|
|
|
2011-05-02 15:48:29 +08:00
|
|
|
</body>
|
|
|
|
</html>
|