HsStringPrim now contains FastBytes, not FastString
[ghc.git] / mk / build.mk.sample
1 # -----------------------------------------------------------------------------
2 # A Sample build.mk
3 #
4 # Uncomment one of the following BuildFlavour settings to get the desired
5 # overall build type, and then tweak the options in the relevant section
6 # below.
7
8 # Uncomment one of these to select a build profile below:
9
10 # Full build with max optimisation and everything enabled (very slow build)
11 #BuildFlavour = perf
12
13 # As above but build GHC using the LLVM backend
14 #BuildFlavour = perf-llvm
15
16 # Fast build with optimised libraries, no profiling (RECOMMENDED):
17 #BuildFlavour = quick
18
19 # Even faster build.  NOT RECOMMENDED: the libraries will be
20 # completely unoptimised, so any code built with this compiler
21 # (including stage2) will run very slowly:
22 #BuildFlavour = quickest
23
24 # Profile the stage2 compiler:
25 #BuildFlavour = prof
26
27 # A development build, working on the stage 1 compiler:
28 #BuildFlavour = devel1
29
30 # A development build, working on the stage 2 compiler:
31 #BuildFlavour = devel2
32
33 # An unregisterised, optimised build of ghc, for porting:
34 #BuildFlavour = unreg
35
36 GhcLibWays = v
37
38 # -------- 1. A Performance/Distribution build--------------------------------
39
40 ifeq "$(BuildFlavour)" "perf"
41
42 # perf matches the default settings, repeated here for comparison:
43
44 SRC_HC_OPTS     = -O -H64m
45 GhcStage1HcOpts = -O -fasm
46 GhcStage2HcOpts = -O2 -fasm
47 GhcHcOpts       = -Rghc-timing
48 GhcLibHcOpts    = -O2
49 GhcLibWays     += p
50
51 ifeq "$(PlatformSupportsSharedLibs)" "YES"
52 GhcLibWays += dyn
53 endif
54
55 endif
56
57 # ---------------- Perf build using LLVM -------------------------------------
58
59 ifeq "$(BuildFlavour)" "perf-llvm"
60
61 SRC_HC_OPTS     = -O -H64m -fllvm
62 GhcStage1HcOpts = -O -fllvm
63 GhcStage2HcOpts = -O2 -fllvm
64 GhcHcOpts       = -Rghc-timing
65 GhcLibHcOpts    = -O2
66 GhcLibWays     += p
67
68 ifeq "$(PlatformSupportsSharedLibs)" "YES"
69 GhcLibWays += dyn
70 endif
71
72 endif
73
74 # -------- A Fast build ------------------------------------------------------
75
76 ifeq "$(BuildFlavour)" "quickest"
77
78 SRC_HC_OPTS        = -H64m -O0 -fasm
79 GhcStage1HcOpts    = -O -fasm
80 GhcStage2HcOpts    = -O0 -fasm
81 GhcLibHcOpts       = -O0 -fasm
82 SplitObjs          = NO
83 HADDOCK_DOCS       = NO
84 BUILD_DOCBOOK_HTML = NO
85 BUILD_DOCBOOK_PS   = NO
86 BUILD_DOCBOOK_PDF  = NO
87
88 endif
89
90 # -------- A Fast build with optimised libs ----------------------------------
91
92 ifeq "$(BuildFlavour)" "quick"
93
94 SRC_HC_OPTS        = -H64m -O0 -fasm
95 GhcStage1HcOpts    = -O -fasm
96 GhcStage2HcOpts    = -O0 -fasm
97 GhcLibHcOpts       = -O -fasm
98 SplitObjs          = NO
99 HADDOCK_DOCS       = NO
100 BUILD_DOCBOOK_HTML = NO
101 BUILD_DOCBOOK_PS   = NO
102 BUILD_DOCBOOK_PDF  = NO
103
104 endif
105
106 # -------- Profile the stage2 compiler ---------------------------------------
107
108 ifeq "$(BuildFlavour)" "prof"
109
110 SRC_HC_OPTS        = -H64m -O0 -fasm
111 GhcStage1HcOpts    = -O -fasm
112 GhcStage2HcOpts    = -O -fasm
113 GhcLibHcOpts       = -O -fasm
114
115 GhcLibWays         += p
116 GhcProfiled        = YES
117
118 SplitObjs          = NO
119 HADDOCK_DOCS       = NO
120 BUILD_DOCBOOK_HTML = NO
121 BUILD_DOCBOOK_PS   = NO
122 BUILD_DOCBOOK_PDF  = NO
123
124 endif
125
126
127 # -------- A Development build (stage 1) -------------------------------------
128
129 ifeq "$(BuildFlavour)" "devel1"
130
131 SRC_HC_OPTS        = -H64m -O -fasm
132 GhcLibHcOpts       = -O -dcore-lint
133 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
134 GhcStage2HcOpts    = -Rghc-timing -O -fasm
135 SplitObjs          = NO
136 HADDOCK_DOCS       = NO
137 BUILD_DOCBOOK_HTML = NO
138 BUILD_DOCBOOK_PS   = NO
139 BUILD_DOCBOOK_PDF  = NO
140 LAX_DEPENDENCIES   = YES
141
142 endif
143
144 # -------- A Development build (stage 2) -------------------------------------
145
146 ifeq "$(BuildFlavour)" "devel2"
147
148 SRC_HC_OPTS        = -H64m -O -fasm
149 GhcLibHcOpts       = -O -dcore-lint
150 GhcStage1HcOpts    = -Rghc-timing -O -fasm
151 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
152 SplitObjs          = NO
153 HADDOCK_DOCS       = NO
154 BUILD_DOCBOOK_HTML = NO
155 BUILD_DOCBOOK_PS   = NO
156 BUILD_DOCBOOK_PDF  = NO
157 LAX_DEPENDENCIES   = YES
158
159 # After stage 1 and the libraries have been built, you can uncomment this line:
160
161 # stage=2
162
163 # Then stage 1 will not be touched by the build system, until
164 # you comment the line again.  This is a useful trick for when you're
165 # working on stage 2 and want to freeze stage 1 and the libraries for
166 # a while.
167
168 endif
169
170 # -------- A Unregisterised build) -------------------------------------------
171
172 ifeq "$(BuildFlavour)" "unreg"
173
174 # Note that the LLVM backend works in unregisterised mode as well as
175 # registerised mode. This often makes it a good choice for porting
176 # GHC.
177
178 GhcUnregisterised    = YES
179 GhcWithNativeCodeGen = NO
180
181 SRC_HC_OPTS          = -O -H64m # -fllvm
182 GhcStage1HcOpts      = -O
183 GhcStage2HcOpts      = -O2
184 GhcHcOpts            = -Rghc-timing
185 GhcLibHcOpts         = -O2
186 SplitObjs            = NO
187 HADDOCK_DOCS         = NO
188 BUILD_DOCBOOK_HTML   = NO
189 BUILD_DOCBOOK_PS     = NO
190 BUILD_DOCBOOK_PDF    = NO
191
192 endif
193
194 # -----------------------------------------------------------------------------
195 # Other settings that might be useful
196
197 # NoFib settings
198 NoFibWays =
199 STRIP_CMD = :
200