Occurrrence analysis improvements for NOINLINE functions
[ghc.git] / hadrian / doc / flavours.md
1 # Build flavours
2
3 Hadrian supports a few predefined _build flavours_, i.e. collections of build
4 settings that fully define a GHC build (see `src/Flavour.hs`). Users can add their
5 own build flavours if need be, as described
6 [here](https://github.com/snowleopard/hadrian/blob/master/doc/user-settings.md#build-flavour).
7
8 ## Arguments
9
10 The following table summarises extra arguments passed to GHC in different build flavours.
11 There are four groups of arguments: arguments in `hsDefault` are passed to GHC for all Haskell
12 source files, `hsLibrary` arguments are added when compiling libraries, `hsCompiler`
13 when compiling the `compiler` library, and `hsGhc` when compiling/linking the GHC program.
14
15 <table>
16   <tr>
17     <th rowspan="3">Flavour</th>
18     <th colspan="8">Extra arguments</th>
19   </tr>
20   <tr>
21     <th colspan="2">hsDefault</td>
22     <th colspan="2">hsLibrary</td>
23     <th colspan="2">hsCompiler</td>
24     <th colspan="2">hsGhc</td>
25   </tr>
26   <tr>
27     <th>stage0</td>
28     <th>stage1+</td>
29     <th>stage0</td>
30     <th>stage1+</td>
31     <th>stage0</td>
32     <th>stage1+</td>
33     <th>stage0</td>
34     <th>stage1+</td>
35   </tr>
36   <tr>
37     <th>default<br></td>
38     <td>-O<br>-H64m<br></td>
39     <td>-O2<br>-H64m</td>
40     <td></td>
41     <td></td>
42     <td></td>
43     <td></td>
44     <td></td>
45     <td></td>
46   </tr>
47   <tr>
48     <th>quick</td>
49     <td>-O0<br>-H64m</td>
50     <td>-O0<br>-H64m</td>
51     <td></td>
52     <td>-O</td>
53     <td>-O</td>
54     <td></td>
55     <td>-O</td>
56     <td></td>
57   </tr>
58   <tr>
59     <th>quickest</td>
60     <td>-O0<br>-H64m</td>
61     <td>-O0<br>-H64m</td>
62     <td></td>
63     <td></td>
64     <td>-O</td>
65     <td></td>
66     <td>-O</td>
67     <td></td>
68   </tr>
69   <tr>
70     <th>perf</td>
71     <td>-O<br>-H64m</td>
72     <td>-O<br>-H64m</td>
73     <td></td>
74     <td>-O2</td>
75     <td>-O</td>
76     <td>-O2</td>
77     <td>-O</td>
78     <td>-O2</td>
79   </tr>
80   <tr>
81     <th>prof</td>
82     <td>-O0<br>-H64m</td>
83     <td>-O0<br>-H64m</td>
84     <td></td>
85     <td>-O</td>
86     <td>-O</td>
87     <td>-O</td>
88     <td>-O</td>
89     <td>-O</td>
90   </tr>
91   <tr>
92     <th>devel1</td>
93     <td>-O<br>-H64m</td>
94     <td>-O<br>-H64m</td>
95     <td></td>
96     <td>-dcore-lint</td>
97     <td>-O0<br>-DDEBUG</td>
98     <td></td>
99     <td>-O0<br>-DDEBUG</td>
100     <td></td>
101   </tr>
102   <tr>
103     <th>devel2</td>
104     <td>-O<br>-H64m</td>
105     <td>-O<br>-H64m</td>
106     <td></td>
107     <td>-dcore-lint</td>
108     <td></td>
109     <td>-O0<br>-DDEBUG</td>
110     <td></td>
111     <td>-O0<br>-DDEBUG</td>
112   </tr>
113 </table>
114
115 ## Ways
116
117 Libraries and GHC can be built in different _ways_, e.g. with or without profiling
118 information. The following table lists ways that are built in different flavours.
119
120 <table>
121     <tr>
122         <th rowspan="2">Flavour</th>
123         <th colspan="2">Library ways</th>
124         <th colspan="2">RTS ways</th>
125         <th colspan="2">Profiled GHC</th>
126     </tr>
127     <tr>
128         <th>stage0</th>
129         <th>stage1+</th>
130         <th>stage0</th>
131         <th>stage1+</th>
132         <th>stage0</th>
133         <th>stage1+</th>
134     </tr>
135     <tr>
136     <th>default<br>perf<br>prof<br>devel1<br>devel2</td>
137     <td>vanilla</td>
138     <td>vanilla<br>profiling<br>dynamic</td>
139     <td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
140         <br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
141         <br>loggingDynamic<br>threadedLoggingDynamic
142     </td>
143     <td>
144         logging<br>debug<br>threaded<br>threadedDebug<br>
145         threadedLogging<br>threadedProfiling
146         <br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
147         <br>loggingDynamic<br>threadedLoggingDynamic
148     </td>
149     <td>Only in<br>prof<br>flavour</td>
150     <td>Only in<br>prof<br>flavour</td>
151 </tr>
152 <tr>
153     <th>quick</th>
154     <td>vanilla</td>
155     <td>vanilla<br>dynamic</td>
156     <td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
157         <br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
158         <br>loggingDynamic<br>threadedLoggingDynamic
159     </td>
160     <td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
161         <br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
162         <br>loggingDynamic<br>threadedLoggingDynamic
163     </td>
164     <td>No</td>
165     <td>No</td>
166 </tr>
167 <tr>
168     <th>quickest</th>
169     <td>vanilla</td>
170     <td>vanilla</td>
171     <td>vanilla<br>threaded</td>
172     <td>vanilla<br>threaded</td>
173     <td>No</td>
174     <td>No</td>
175 </tr>
176 </table>