summaryrefslogtreecommitdiff
path: root/mk/build.mk.sample
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2012-01-13 13:51:47 -0800
committerDavid Terei <davidterei@gmail.com>2012-01-13 13:51:47 -0800
commit6b58460309598b399fba1bdd223da7bc96d07431 (patch)
treec625a44d6237272fb1e99702eef2beb435e1d542 /mk/build.mk.sample
parent601c983dd0bada6b49bdadd8f172fd4eacac4b0c (diff)
downloadhaskell-6b58460309598b399fba1bdd223da7bc96d07431.tar.gz
Add some llvm build options to build.mk.sample
Diffstat (limited to 'mk/build.mk.sample')
-rw-r--r--mk/build.mk.sample27
1 files changed, 26 insertions, 1 deletions
diff --git a/mk/build.mk.sample b/mk/build.mk.sample
index 10ab7afc76..e979f3990e 100644
--- a/mk/build.mk.sample
+++ b/mk/build.mk.sample
@@ -10,6 +10,9 @@
# Full build with max optimisation and everything enabled (very slow build)
#BuildFlavour = perf
+# As above but build GHC using the LLVM backend
+#BuildFlavour = perf-llvm
+
# Fast build with optimised libraries, no profiling (RECOMMENDED):
#BuildFlavour = quick
@@ -51,6 +54,23 @@ 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"
@@ -151,10 +171,14 @@ endif
ifeq "$(BuildFlavour)" "unreg"
+# Note that the LLVM backend works in unregisterised mode as well as
+# registerised mode. This often makes it a good choice for porting
+# GHC.
+
GhcUnregisterised = YES
GhcWithNativeCodeGen = NO
-SRC_HC_OPTS = -O -H64m
+SRC_HC_OPTS = -O -H64m # -fllvm
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcHcOpts = -Rghc-timing
@@ -173,3 +197,4 @@ endif
# NoFib settings
NoFibWays =
STRIP_CMD = :
+