1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1" />
6 <title>Polly - Getting Started
</title>
7 <link type=
"text/css" rel=
"stylesheet" href=
"menu.css" />
8 <link type=
"text/css" rel=
"stylesheet" href=
"content.css" />
13 <!--#include virtual="menu.html.incl"-->
17 <h1>Building and Installing Polly
</h1>
18 You can build Polly with
<a href=
"https://cmake.org/">cmake
</a> and your preferred geneator (e.g. Ninja, make, Visual Studio, etc.).
20 <h3 id=
"source">Get the code
</h3>
23 git clone https://github.com/llvm/llvm-project.git
26 You can also get a shallow clone by running:
29 git clone --depth
1 https://github.com/llvm/llvm-project.git
32 <h3 id=
"build">Build Polly
</h3>
35 mkdir build && cd build
36 cmake '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
40 You can also pass arguments to cmake to specify a particular generator (e.g.
<code>-G Ninja
</code>) or the build type (
<code>-DCMAKE_BUILD_TYPE=Release
</code>).
42 If you just want to play around with Polly, it is recommended to do a Release+Assert build by passing
43 <code>-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
</code>.
47 To test Polly, you can run
49 <pre>cmake --build . --target check-polly
</pre>
53 Suppose that you want to compile a program hello.c using Polly.
55 To compile it with Polly (in the build folder), you can run:
58 bin/clang -O3 -mllvm -polly hello.c
61 <h3> Troubleshooting
</h3>
64 If you run out of memory when building with Ninja, try lowering the concurrency of Ninja (e.g.
<code> ninja -j
2 </code>).
65 More tips and tricks to building and using LLVM can be found
<a href=
"https://llvm.org/docs/GettingStarted.html#common-problems">here
</a>.
69 For more information on getting started with Polly and LLVM in general, see LLVM's
<a href =
"https://llvm.org/docs/GettingStarted.html">getting started docs
</a>.