Ticket #8205: build.mk

File build.mk, 4.8 KB (added by erikd, 8 months ago)

build.mk file from my powerpc64 build tree as requested by @jstolarek.

Line 
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)
11BuildFlavour = devel2
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
36GhcLibWays = $(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
44ifeq "$(BuildFlavour)" "perf"
45
46# perf matches the default settings, repeated here for comparison:
47
48SRC_HC_OPTS     = -O -H64m
49GhcStage1HcOpts = -O -fasm
50GhcStage2HcOpts = -O2 -fasm
51GhcHcOpts       = -Rghc-timing
52GhcLibHcOpts    = -O2
53GhcLibWays     += p
54
55ifeq "$(PlatformSupportsSharedLibs)" "YES"
56GhcLibWays += dyn
57endif
58
59endif
60
61# ---------------- Perf build using LLVM -------------------------------------
62
63ifeq "$(BuildFlavour)" "perf-llvm"
64
65SRC_HC_OPTS     = -O -H64m -fllvm
66GhcStage1HcOpts = -O -fllvm
67GhcStage2HcOpts = -O2 -fllvm
68GhcHcOpts       = -Rghc-timing
69GhcLibHcOpts    = -O2
70GhcLibWays     += p
71
72ifeq "$(PlatformSupportsSharedLibs)" "YES"
73GhcLibWays += dyn
74endif
75
76endif
77
78# -------- A Fast build ------------------------------------------------------
79
80ifeq "$(BuildFlavour)" "quickest"
81
82SRC_HC_OPTS        = -H64m -O0 -fasm
83GhcStage1HcOpts    = -O -fasm
84GhcStage2HcOpts    = -O0 -fasm
85GhcLibHcOpts       = -O0 -fasm
86SplitObjs          = NO
87HADDOCK_DOCS       = NO
88BUILD_DOCBOOK_HTML = NO
89BUILD_DOCBOOK_PS   = NO
90BUILD_DOCBOOK_PDF  = NO
91
92endif
93
94# -------- A Fast build with optimised libs ----------------------------------
95
96ifeq "$(BuildFlavour)" "quick"
97
98SRC_HC_OPTS        = -H64m -O0 -fasm
99GhcStage1HcOpts    = -O -fasm
100GhcStage2HcOpts    = -O0 -fasm
101GhcLibHcOpts       = -O -fasm
102SplitObjs          = NO
103HADDOCK_DOCS       = NO
104BUILD_DOCBOOK_HTML = NO
105BUILD_DOCBOOK_PS   = NO
106BUILD_DOCBOOK_PDF  = NO
107
108endif
109
110# -------- A Fast build with optimised libs using LLVM -----------------------
111
112ifeq "$(BuildFlavour)" "quick-llvm"
113
114SRC_HC_OPTS        = -H64m -O0 -fllvm
115GhcStage1HcOpts    = -O -fllvm
116GhcStage2HcOpts    = -O0 -fllvm
117GhcLibHcOpts       = -O -fllvm
118SplitObjs          = NO
119HADDOCK_DOCS       = NO
120BUILD_DOCBOOK_HTML = NO
121BUILD_DOCBOOK_PS   = NO
122BUILD_DOCBOOK_PDF  = NO
123
124endif
125
126# -------- Profile the stage2 compiler ---------------------------------------
127
128ifeq "$(BuildFlavour)" "prof"
129
130SRC_HC_OPTS        = -H64m -O0 -fasm
131GhcStage1HcOpts    = -O -fasm
132GhcStage2HcOpts    = -O -fasm
133GhcLibHcOpts       = -O -fasm
134
135GhcLibWays         += p
136GhcProfiled        = YES
137
138SplitObjs          = NO
139HADDOCK_DOCS       = NO
140BUILD_DOCBOOK_HTML = NO
141BUILD_DOCBOOK_PS   = NO
142BUILD_DOCBOOK_PDF  = NO
143
144endif
145
146
147# -------- A Development build (stage 1) -------------------------------------
148
149ifeq "$(BuildFlavour)" "devel1"
150
151SRC_HC_OPTS        = -H64m -O -fasm
152GhcLibHcOpts       = -O -dcore-lint
153GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
154GhcStage2HcOpts    = -Rghc-timing -O -fasm
155SplitObjs          = NO
156HADDOCK_DOCS       = NO
157BUILD_DOCBOOK_HTML = NO
158BUILD_DOCBOOK_PS   = NO
159BUILD_DOCBOOK_PDF  = NO
160LAX_DEPENDENCIES   = YES
161
162endif
163
164# -------- A Development build (stage 2) -------------------------------------
165
166ifeq "$(BuildFlavour)" "devel2"
167
168SRC_HC_OPTS        = -H64m -O -fasm
169GhcLibHcOpts       = -O -dcore-lint
170GhcStage1HcOpts    = -Rghc-timing -O -fasm
171GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
172SplitObjs          = NO
173HADDOCK_DOCS       = NO
174BUILD_DOCBOOK_HTML = NO
175BUILD_DOCBOOK_PS   = NO
176BUILD_DOCBOOK_PDF  = NO
177LAX_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
188endif
189
190# -----------------------------------------------------------------------------
191# Other settings that might be useful
192
193# NoFib settings
194NoFibWays =
195STRIP_CMD = :
196