cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
77 lines
2.1 KiB
HTML
77 lines
2.1 KiB
HTML
<!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>
|
|
|
|
<div id="box">
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
<div id="content">
|
|
|
|
<h1>Building and Installing Polly</h1>
|
|
You can build Polly with <a href="https://cmake.org/">cmake</a> and your preferred generator (e.g. Ninja, make, Visual Studio, etc.).
|
|
|
|
<h3 id="source">Get the code</h3>
|
|
|
|
<pre>
|
|
git clone https://github.com/llvm/llvm-project.git
|
|
</pre>
|
|
|
|
You can also get a shallow clone by running:
|
|
|
|
<pre>
|
|
git clone --depth 1 https://github.com/llvm/llvm-project.git
|
|
</pre>
|
|
|
|
<h3 id="build">Build Polly</h3>
|
|
|
|
<pre>
|
|
mkdir build && cd build
|
|
cmake '-DLLVM_ENABLE_PROJECTS=clang;polly' ../llvm
|
|
cmake --build .
|
|
</pre>
|
|
|
|
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>).
|
|
|
|
If you just want to play around with Polly, it is recommended to do a Release+Assert build by passing
|
|
<code>-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON</code>.
|
|
|
|
<h3>Test Polly</h3>
|
|
|
|
To test Polly, you can run
|
|
|
|
<pre>cmake --build . --target check-polly</pre>
|
|
|
|
<h3>Using Polly</h3>
|
|
|
|
Suppose that you want to compile a program hello.c using Polly.
|
|
|
|
To compile it with Polly (in the build folder), you can run:
|
|
|
|
<pre>
|
|
bin/clang -O3 -mllvm -polly hello.c
|
|
</pre>
|
|
|
|
<h3> Troubleshooting</h3>
|
|
|
|
<p>
|
|
If you run out of memory when building with Ninja, try lowering the concurrency of Ninja (e.g. <code> ninja -j 2 </code>).
|
|
More tips and tricks to building and using LLVM can be found <a href="https://llvm.org/docs/GettingStarted.html#common-problems">here</a>.
|
|
</p>
|
|
|
|
<p>
|
|
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>.
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|