[commit: ghc] master: Add "bench" build flavour to build system (ddf79eb)
git at git.haskell.org
git at git.haskell.org
Mon Mar 10 17:57:50 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ddf79ebf69fe4a6e69d69d451a6040a53b1ea12c/ghc
>---------------------------------------------------------------
commit ddf79ebf69fe4a6e69d69d451a6040a53b1ea12c
Author: Johan Tibell <johan.tibell at gmail.com>
Date: Mon Mar 10 18:54:47 2014 +0100
Add "bench" build flavour to build system
This build generates the same code as the "perf" build and is thus
good for compiling benchmarks and inspecting the generated
code. However, it compiles the stage2 compiler faster at the expense
of compiler user programs more slowly.
>---------------------------------------------------------------
ddf79ebf69fe4a6e69d69d451a6040a53b1ea12c
mk/build.mk.sample | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index cb049ba..a16eb0f 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -40,6 +40,17 @@
# A development build, working on the stage 2 compiler:
#BuildFlavour = devel2
+# 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
+
+# As above but build GHC using the LLVM backend
+#BuildFlavour = bench-llvm
+
+# Bench build configured for a cross-compiler
+#BuildFlavour = bench-cross
+
# -------- Miscellaneous variables --------------------------------------------
# Set to V = 0 to get prettier build output.
@@ -235,6 +246,59 @@ LAX_DEPENDENCIES = YES
endif
+# -------- A bench build with optimised libs -----------------------------------
+
+ifeq "$(BuildFlavour)" "bench"
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O2 -fasm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# ---------------- Perf build using LLVM --------------------------------------
+
+ifeq "$(BuildFlavour)" "bench-llvm"
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O -fllvm
+GhcStage2HcOpts = -O0 -fllvm
+GhcLibHcOpts = -O2 -fllvm
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+endif
+
+# ------- A Perf build configured for cross-compilation ----------------------
+
+ifeq "$(BuildFlavour)" "bench-cross"
+
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O -fasm
+GhcStage2HcOpts = -O0 -fasm
+GhcLibHcOpts = -O2 -fasm
+SplitObjs = NO
+INTEGER_LIBRARY = integer-simple
+Stage1Only = YES
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
+
+DYNAMIC_BY_DEFAULT = NO
+DYNAMIC_GHC_PROGRAMS = NO
+
+endif
+
# -----------------------------------------------------------------------------
# Other settings that might be useful
More information about the ghc-commits
mailing list