1# -----------------------------------------------------------------------------
2# A Sample build.mk
3#
4# Uncomment one of the following BuildFlavour settings to get the desired
5# overall build type.
6
7# -------- Build profiles -----------------------------------------------------
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# Perf build configured for a cross-compiler (using the LLVM backend)
17#BuildFlavour = perf-cross
18
19# Perf build configured for a cross-compiler (using the NCG backend)
20#BuildFlavour = perf-cross-ncg
21
22# Fast build with optimised libraries, no profiling (RECOMMENDED):
23#BuildFlavour = quick
24
25# Fast build with optimised libraries, no profiling, with LLVM:
26#BuildFlavour = quick-llvm
27
28# Fast build configured for a cross compiler (using the LLVM backend)
29#BuildFlavour = quick-cross
30
31# Fast build configured for a cross compiler (using the NCG backend)
32#BuildFlavour = quick-cross-ncg
33
34# Even faster build.  NOT RECOMMENDED: the libraries will be
35# completely unoptimised, so any code built with this compiler
36# (including stage2) will run very slowly, and many GHC tests
37# will fail with this profile (see #12141):
38#BuildFlavour = quickest
39
40# Profile the stage2 compiler:
41#BuildFlavour = prof
42
43# Profile the stage2 compiler (LLVM backend):
44#BuildFlavour = prof-llvm
45
46# A development build, working on the stage 1 compiler:
47#BuildFlavour = devel1
48
49# A development build, working on the stage 2 compiler:
50#BuildFlavour = devel2
51
52# A build with max optimisation that still builds the stage2 compiler
53# quickly. Compiled code will be the same as with "perf". Programs
54# will compile more slowly.
55#BuildFlavour = bench
56
57# As above but build GHC using the LLVM backend
58#BuildFlavour = bench-llvm
59
60# Bench build configured for a cross-compiler (using the LLVM backend)
61#BuildFlavour = bench-cross
62
63# Bench build configured for a cross-compiler (using the NCG backend)
64#BuildFlavour = bench-cross-ncg
65
66# Use the same settings as validate.
67#BuildFlavour = validate
68
69ifneq "$(BuildFlavour)" ""
70include mk/flavours/$(BuildFlavour).mk
71endif
72
73# -------- Miscellaneous variables --------------------------------------------
74
75# Set to V = 0 to get prettier build output.
76# Please use V=1 (the default) when reporting GHC bugs.
77#V=0
78
79# Should all enabled warnings (see mk/warnings.mk) be turned into errors while
80# building stage 2?
81#WERROR=-Werror
82
83# After stage 1 and the libraries have been built, you can uncomment this line:
84#stage=2
85
86# Then stage 1 will not be touched by the build system, until
87# you comment the line again.  This is a useful trick for when you're
88# working on stage 2 and want to freeze stage 1 and the libraries for
89# a while.
90
91# Enable these if you would like DWARF debugging symbols for your libraries.
92# This is necessary, for instance, to get DWARF stack traces out of programs
93# built by the produced compiler. You must also pass --enable-dwarf-unwind to
94# `configure` to enable the runtime system's builtin unwinding support.
95#GhcLibHcOpts += -g3
96#GhcRtsHcOpts += -g3
97
98# Build the "extra" packages (see ./packages). This enables more tests. See:
99# https://gitlab.haskell.org/ghc/ghc/wikis/building/running-tests/running#additional-packages
100#BUILD_EXTRA_PKGS=YES
101
102# Uncomment the following to force `integer-gmp` to use the in-tree GMP 6.1.2
103# (other sometimes useful configure-options: `--with-gmp-{includes,libraries}`)
104#libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp
105
106# Enable pretty hyperlinked sources
107#HADDOCK_DOCS = YES
108#EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source
109
110# Don't strip debug and other unneeded symbols from libraries and executables.
111STRIP_CMD = :
112