Bump haddock submodule
[ghc.git] / mk / build.mk.sample
index e055b49..958cea7 100644 (file)
@@ -2,9 +2,9 @@
 # A Sample build.mk
 #
 # Uncomment one of the following BuildFlavour settings to get the desired
-# overall build type, and then tweak the options in the relevant section
-# below.
+# overall build type.
 
+# -------- Build profiles -----------------------------------------------------
 # Uncomment one of these to select a build profile below:
 
 # Full build with max optimisation and everything enabled (very slow build)
 # As above but build GHC using the LLVM backend
 #BuildFlavour = perf-llvm
 
+# Perf build configured for a cross-compiler
+#BuildFlavour = perf-cross
+
 # Fast build with optimised libraries, no profiling (RECOMMENDED):
 #BuildFlavour = quick
 
 # Fast build with optimised libraries, no profiling, with LLVM:
 #BuildFlavour = quick-llvm
 
+# Fast build configured for a cross compiler
+#BuildFlavour  = quick-cross
+
 # Even faster build.  NOT RECOMMENDED: the libraries will be
 # completely unoptimised, so any code built with this compiler
-# (including stage2) will run very slowly:
+# (including stage2) will run very slowly, and many GHC tests
+# will fail with this profile (see Trac #12141):
 #BuildFlavour = quickest
 
 # Profile the stage2 compiler:
 #BuildFlavour = prof
 
+# Profile the stage2 compiler (LLVM backend):
+#BuildFlavour = prof-llvm
+
 # A development build, working on the stage 1 compiler:
 #BuildFlavour = devel1
 
 # A development build, working on the stage 2 compiler:
 #BuildFlavour = devel2
 
-GhcLibWays = $(if $(filter $(DYNAMIC_BY_DEFAULT),YES),dyn,v)
-
-# Uncomment this to get prettier build output.
-# Please use V = 1 when reporting GHC bugs.
-# V = 0
-
-# -------- 1. A Performance/Distribution build--------------------------------
-
-ifeq "$(BuildFlavour)" "perf"
-
-# perf matches the default settings, repeated here for comparison:
-
-SRC_HC_OPTS     = -O -H64m
-GhcStage1HcOpts = -O -fasm
-GhcStage2HcOpts = -O2 -fasm
-GhcHcOpts       = -Rghc-timing
-GhcLibHcOpts    = -O2
-GhcLibWays     += p
-
-ifeq "$(PlatformSupportsSharedLibs)" "YES"
-GhcLibWays += dyn
-endif
-
-endif
-
-# ---------------- Perf build using LLVM -------------------------------------
-
-ifeq "$(BuildFlavour)" "perf-llvm"
-
-SRC_HC_OPTS     = -O -H64m -fllvm
-GhcStage1HcOpts = -O -fllvm
-GhcStage2HcOpts = -O2 -fllvm
-GhcHcOpts       = -Rghc-timing
-GhcLibHcOpts    = -O2
-GhcLibWays     += p
-
-ifeq "$(PlatformSupportsSharedLibs)" "YES"
-GhcLibWays += dyn
-endif
-
-endif
-
-# -------- A Fast build ------------------------------------------------------
-
-ifeq "$(BuildFlavour)" "quickest"
-
-SRC_HC_OPTS        = -H64m -O0 -fasm
-GhcStage1HcOpts    = -O -fasm
-GhcStage2HcOpts    = -O0 -fasm
-GhcLibHcOpts       = -O0 -fasm
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-
-endif
-
-# -------- A Fast build with optimised libs ----------------------------------
+# A build with max optimisation that still builds the stage2 compiler
+# quickly. Compiled code will be the same as with "perf". Programs
+# will compile more slowly.
+#BuildFlavour = bench
 
-ifeq "$(BuildFlavour)" "quick"
-
-SRC_HC_OPTS        = -H64m -O0 -fasm
-GhcStage1HcOpts    = -O -fasm
-GhcStage2HcOpts    = -O0 -fasm
-GhcLibHcOpts       = -O -fasm
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-
-endif
-
-# -------- A Fast build with optimised libs using LLVM -----------------------
-
-ifeq "$(BuildFlavour)" "quick-llvm"
-
-SRC_HC_OPTS        = -H64m -O0 -fllvm
-GhcStage1HcOpts    = -O -fllvm
-GhcStage2HcOpts    = -O0 -fllvm
-GhcLibHcOpts       = -O -fllvm
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-
-endif
-
-# -------- Profile the stage2 compiler ---------------------------------------
-
-ifeq "$(BuildFlavour)" "prof"
-
-SRC_HC_OPTS        = -H64m -O0 -fasm
-GhcStage1HcOpts    = -O -fasm
-GhcStage2HcOpts    = -O -fasm
-GhcLibHcOpts       = -O -fasm
-
-GhcLibWays         += p
-GhcProfiled        = YES
-
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-
-endif
-
-
-# -------- A Development build (stage 1) -------------------------------------
+# As above but build GHC using the LLVM backend
+#BuildFlavour = bench-llvm
 
-ifeq "$(BuildFlavour)" "devel1"
+# Bench build configured for a cross-compiler
+#BuildFlavour = bench-cross
 
-SRC_HC_OPTS        = -H64m -O -fasm
-GhcLibHcOpts       = -O -dcore-lint
-GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
-GhcStage2HcOpts    = -Rghc-timing -O -fasm
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-LAX_DEPENDENCIES   = YES
+# Use the same settings as validate.
+#BuildFlavour = validate
 
+ifneq "$(BuildFlavour)" ""
+include mk/flavours/$(BuildFlavour).mk
 endif
 
-# -------- A Development build (stage 2) -------------------------------------
+# -------- Miscellaneous variables --------------------------------------------
 
-ifeq "$(BuildFlavour)" "devel2"
+# Set to V = 0 to get prettier build output.
+# Please use V=1 (the default) when reporting GHC bugs.
+#V=0
 
-SRC_HC_OPTS        = -H64m -O -fasm
-GhcLibHcOpts       = -O -dcore-lint
-GhcStage1HcOpts    = -Rghc-timing -O -fasm
-GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
-SplitObjs          = NO
-HADDOCK_DOCS       = NO
-BUILD_DOCBOOK_HTML = NO
-BUILD_DOCBOOK_PS   = NO
-BUILD_DOCBOOK_PDF  = NO
-LAX_DEPENDENCIES   = YES
+# Should all enabled warnings (see mk/warnings.mk) be turned into errors while
+# building stage 2?
+#WERROR=-Werror
 
 # After stage 1 and the libraries have been built, you can uncomment this line:
-
-# stage=2
+#stage=2
 
 # Then stage 1 will not be touched by the build system, until
 # you comment the line again.  This is a useful trick for when you're
 # working on stage 2 and want to freeze stage 1 and the libraries for
 # a while.
 
-endif
+# Enable these if you would like DWARF debugging symbols for your libraries.
+# This is necessary, for instance, to get DWARF stack traces out of programs
+# built by the produced compiler. You must also pass --enable-dwarf-unwind to
+# `configure` to enable the runtime system's builtin unwinding support.
+#GhcLibHcOpts += -g3
+#GhcRtsHcOpts += -g3
 
-# -----------------------------------------------------------------------------
-# Other settings that might be useful
+# Build the "extra" packages (see ./packages). This enables more tests. See:
+# https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Running#AdditionalPackages
+#BUILD_EXTRA_PKGS=YES
 
-# NoFib settings
-NoFibWays =
-STRIP_CMD = :
+# Uncomment the following line to enable building DPH
+#BUILD_DPH=YES
 
+# Uncomment the following to force `integer-gmp` to use the in-tree GMP 6.1.2
+# (other sometimes useful configure-options: `--with-gmp-{includes,libraries}`)
+#libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp
+
+# Enable pretty hyperlinked sources
+#HADDOCK_DOCS = YES
+#EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source
+
+# Don't strip debug and other unneeded symbols from libraries and executables.
+STRIP_CMD = :