summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-06 15:17:11 +0100
committerBen Gamari <ben@smart-cactus.org>2022-05-18 11:16:59 -0400
commitab4d7420589ad06d2eb084a787b9175d8c0e5c51 (patch)
tree1e6ef1096037978c652333488a5303280f36528d
parentefa1788a495f7944783e64006151fc5af172b8ac (diff)
downloadhaskell-ab4d7420589ad06d2eb084a787b9175d8c0e5c51.tar.gz
packaging: Build perf builds with -split-sections
In 8f71d958 the make build system was made to use split-sections on linux systems but it appears this logic never made it to hadrian. There is the split_sections flavour transformer but this doesn't appear to be used for perf builds on linux. Closes #21135 (cherry picked from commit 699f593532a3cd5ca1c2fab6e6e4ce9d53be2c1f)
-rw-r--r--hadrian/doc/flavours.md13
-rw-r--r--hadrian/src/Settings/Flavours/Performance.hs2
2 files changed, 14 insertions, 1 deletions
diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md
index f0d34ddc90..9525b7bca4 100644
--- a/hadrian/doc/flavours.md
+++ b/hadrian/doc/flavours.md
@@ -15,6 +15,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<table>
<tr>
<th rowspan="3">Flavour</th>
+ <th rowspan="3">Split Sections</th>
<th colspan="8">Extra arguments</th>
</tr>
<tr>
@@ -35,6 +36,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>default<br></td>
+ <td> </td>
<td>-O<br>-H32m<br></td>
<td>-O2<br>-H32m</td>
<td></td>
@@ -46,6 +48,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick</td>
+ <td> </td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -57,6 +60,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick-validate</td>
+ <td></td>
<td>-O0<br>-H64m<br>-Werror</td>
<td>-O0<br>-H64m<br>-Werror</td>
<td></td>
@@ -68,6 +72,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quick-debug</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -79,6 +84,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>quickest</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
@@ -90,6 +96,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>perf</td>
+ <td> Yes (on supported platforms) </td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -101,6 +108,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>bench</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -112,6 +120,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>devel1</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -123,6 +132,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>devel2</td>
+ <td></td>
<td>-O<br>-H64m</td>
<td>-O<br>-H64m</td>
<td></td>
@@ -134,6 +144,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>validate</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
@@ -145,6 +156,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>slow-validate</td>
+ <td></td>
<td>-O0<br>-H64m</td>
<td>-fllvm-fill-undef-with-garbage</td>
<td></td>
@@ -156,6 +168,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
<tr>
<th>static</td>
+ <td></td>
<td>-O<br>-H64m<br>-fPIC -static</td>
<td>-O<br>-H64m<br>-fPIC -static</td>
<td></td>
diff --git a/hadrian/src/Settings/Flavours/Performance.hs b/hadrian/src/Settings/Flavours/Performance.hs
index fc46920703..17fb22b6ec 100644
--- a/hadrian/src/Settings/Flavours/Performance.hs
+++ b/hadrian/src/Settings/Flavours/Performance.hs
@@ -6,7 +6,7 @@ import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
performanceFlavour :: Flavour
-performanceFlavour = defaultFlavour
+performanceFlavour = splitSections $ defaultFlavour
{ name = "perf"
, args = defaultBuilderArgs <> performanceArgs <> defaultPackageArgs }