summaryrefslogtreecommitdiff
path: root/hadrian/doc
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-09 11:30:52 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-12 19:16:40 -0400
commit5c266b593f0b065bb1d8389b5a404e24d06dd035 (patch)
tree08c9e3495a7b0cddf66f16cf0ff605ddc07a8d28 /hadrian/doc
parente40feab039bcf687cdaefa7a3f7c862d10b9b517 (diff)
downloadhaskell-5c266b593f0b065bb1d8389b5a404e24d06dd035.tar.gz
hadrian: Introduce `static` flavour
Diffstat (limited to 'hadrian/doc')
-rw-r--r--hadrian/doc/flavours.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/hadrian/doc/flavours.md b/hadrian/doc/flavours.md
index d88122ea3f..0f2af1bbf5 100644
--- a/hadrian/doc/flavours.md
+++ b/hadrian/doc/flavours.md
@@ -154,6 +154,17 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<td>-O</td>
<td>-O</td>
</tr>
+ <tr>
+ <th>static</td>
+ <td>-O<br>-H64m<br>-fPIC -static</td>
+ <td>-O<br>-H64m<br>-fPIC -static</td>
+ <td></td>
+ <td>-O2</td>
+ <td>-O2</td>
+ <td>-O2</td>
+ <td>-O<br>-optl -static</td>
+ <td>-O2<br>-optl -static</td>
+ </tr>
</table>
## Flavour transformers
@@ -231,6 +242,16 @@ The supported transformers are listed below:
</tr>
</table>
+### Static
+
+The `static` flavour does not strictly follow the groupings in the table
+above because it links all the executables statically, not just GHC
+itself, and because it passes `-optc -static` when delegating to a C
+compiler. It also adds the `-dynamic-system-linker` cabal flag to the
+`ghc` package build and only adds static flags when building in a
+non-dynamic _way_. Some of the considerations for a static build aren't
+a great fit for the flavour system, so it's a little bit hacky.
+
## Ways
Libraries and GHC can be built in different _ways_, e.g. with or without profiling
@@ -266,6 +287,19 @@ information. The following table lists ways that are built in different flavours
</td>
</tr>
<tr>
+ <th>static</td>
+ <td>vanilla</td>
+ <td>vanilla<br>profiling</td>
+ <td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
+ </td>
+ <td>
+ logging<br>debug<br>threaded<br>threadedDebug<br>
+ threadedLogging<br>threadedProfiling
+ </td>
+ <td>Only in<br>prof<br>flavour</td>
+ <td>Only in<br>prof<br>flavour</td>
+</tr>
+<tr>
<th>quick<br>quick-validate<br>quick-debug</th>
<td>vanilla</td>
<td>vanilla<br>dynamic</td>