In build.mk.sample, include v in GhcLibWays even if DYNAMIC_GHC_PROGRAMS is set
[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 # Fast build with optimised libraries, no profiling, with LLVM:
20 #BuildFlavour = quick-llvm
21
22 # Even faster build.  NOT RECOMMENDED: the libraries will be
23 # completely unoptimised, so any code built with this compiler
24 # (including stage2) will run very slowly:
25 #BuildFlavour = quickest
26
27 # Profile the stage2 compiler:
28 #BuildFlavour = prof
29
30 # A development build, working on the stage 1 compiler:
31 #BuildFlavour = devel1
32
33 # A development build, working on the stage 2 compiler:
34 #BuildFlavour = devel2
35
36 GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v)
37
38 # Uncomment this to get prettier build output.
39 # Please use V = 1 when reporting GHC bugs.
40 # V = 0
41
42 # -------- 1. A Performance/Distribution build--------------------------------
43
44 ifeq "$(BuildFlavour)" "perf"
45
46 # perf matches the default settings, repeated here for comparison:
47
48 SRC_HC_OPTS     = -O -H64m
49 GhcStage1HcOpts = -O -fasm
50 GhcStage2HcOpts = -O2 -fasm
51 GhcHcOpts       = -Rghc-timing
52 GhcLibHcOpts    = -O2
53 GhcLibWays     += p
54
55 ifeq "$(PlatformSupportsSharedLibs)" "YES"
56 GhcLibWays += dyn
57 endif
58
59 endif
60
61 # ---------------- Perf build using LLVM -------------------------------------
62
63 ifeq "$(BuildFlavour)" "perf-llvm"
64
65 SRC_HC_OPTS     = -O -H64m -fllvm
66 GhcStage1HcOpts = -O -fllvm
67 GhcStage2HcOpts = -O2 -fllvm
68 GhcHcOpts       = -Rghc-timing
69 GhcLibHcOpts    = -O2
70 GhcLibWays     += p
71
72 ifeq "$(PlatformSupportsSharedLibs)" "YES"
73 GhcLibWays += dyn
74 endif
75
76 endif
77
78 # -------- A Fast build ------------------------------------------------------
79
80 ifeq "$(BuildFlavour)" "quickest"
81
82 SRC_HC_OPTS        = -H64m -O0 -fasm
83 GhcStage1HcOpts    = -O -fasm
84 GhcStage2HcOpts    = -O0 -fasm
85 GhcLibHcOpts       = -O0 -fasm
86 SplitObjs          = NO
87 HADDOCK_DOCS       = NO
88 BUILD_DOCBOOK_HTML = NO
89 BUILD_DOCBOOK_PS   = NO
90 BUILD_DOCBOOK_PDF  = NO
91
92 endif
93
94 # -------- A Fast build with optimised libs ----------------------------------
95
96 ifeq "$(BuildFlavour)" "quick"
97
98 SRC_HC_OPTS        = -H64m -O0 -fasm
99 GhcStage1HcOpts    = -O -fasm
100 GhcStage2HcOpts    = -O0 -fasm
101 GhcLibHcOpts       = -O -fasm
102 SplitObjs          = NO
103 HADDOCK_DOCS       = NO
104 BUILD_DOCBOOK_HTML = NO
105 BUILD_DOCBOOK_PS   = NO
106 BUILD_DOCBOOK_PDF  = NO
107
108 endif
109
110 # -------- A Fast build with optimised libs using LLVM -----------------------
111
112 ifeq "$(BuildFlavour)" "quick-llvm"
113
114 SRC_HC_OPTS        = -H64m -O0 -fllvm
115 GhcStage1HcOpts    = -O -fllvm
116 GhcStage2HcOpts    = -O0 -fllvm
117 GhcLibHcOpts       = -O -fllvm
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 # -------- Profile the stage2 compiler ---------------------------------------
127
128 ifeq "$(BuildFlavour)" "prof"
129
130 SRC_HC_OPTS        = -H64m -O0 -fasm
131 GhcStage1HcOpts    = -O -fasm
132 GhcStage2HcOpts    = -O -fasm
133 GhcLibHcOpts       = -O -fasm
134
135 GhcLibWays         += p
136 GhcProfiled        = YES
137
138 SplitObjs          = NO
139 HADDOCK_DOCS       = NO
140 BUILD_DOCBOOK_HTML = NO
141 BUILD_DOCBOOK_PS   = NO
142 BUILD_DOCBOOK_PDF  = NO
143
144 endif
145
146
147 # -------- A Development build (stage 1) -------------------------------------
148
149 ifeq "$(BuildFlavour)" "devel1"
150
151 SRC_HC_OPTS        = -H64m -O -fasm
152 GhcLibHcOpts       = -O -dcore-lint
153 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
154 GhcStage2HcOpts    = -Rghc-timing -O -fasm
155 SplitObjs          = NO
156 HADDOCK_DOCS       = NO
157 BUILD_DOCBOOK_HTML = NO
158 BUILD_DOCBOOK_PS   = NO
159 BUILD_DOCBOOK_PDF  = NO
160 LAX_DEPENDENCIES   = YES
161
162 endif
163
164 # -------- A Development build (stage 2) -------------------------------------
165
166 ifeq "$(BuildFlavour)" "devel2"
167
168 SRC_HC_OPTS        = -H64m -O -fasm
169 GhcLibHcOpts       = -O -dcore-lint
170 GhcStage1HcOpts    = -Rghc-timing -O -fasm
171 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
172 SplitObjs          = NO
173 HADDOCK_DOCS       = NO
174 BUILD_DOCBOOK_HTML = NO
175 BUILD_DOCBOOK_PS   = NO
176 BUILD_DOCBOOK_PDF  = NO
177 LAX_DEPENDENCIES   = YES
178
179 # After stage 1 and the libraries have been built, you can uncomment this line:
180
181 # stage=2
182
183 # Then stage 1 will not be touched by the build system, until
184 # you comment the line again.  This is a useful trick for when you're
185 # working on stage 2 and want to freeze stage 1 and the libraries for
186 # a while.
187
188 endif
189
190 # -----------------------------------------------------------------------------
191 # Other settings that might be useful
192
193 # NoFib settings
194 NoFibWays =
195 STRIP_CMD = :
196