Commit 6b584603 authored by dterei's avatar dterei
Browse files

Add some llvm build options to build.mk.sample

parent 601c983d
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
# Full build with max optimisation and everything enabled (very slow build) # Full build with max optimisation and everything enabled (very slow build)
#BuildFlavour = perf #BuildFlavour = perf
# As above but build GHC using the LLVM backend
#BuildFlavour = perf-llvm
# Fast build with optimised libraries, no profiling (RECOMMENDED): # Fast build with optimised libraries, no profiling (RECOMMENDED):
#BuildFlavour = quick #BuildFlavour = quick
...@@ -51,6 +54,23 @@ endif ...@@ -51,6 +54,23 @@ endif
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 ------------------------------------------------------ # -------- A Fast build ------------------------------------------------------
ifeq "$(BuildFlavour)" "quickest" ifeq "$(BuildFlavour)" "quickest"
...@@ -151,10 +171,14 @@ endif ...@@ -151,10 +171,14 @@ endif
ifeq "$(BuildFlavour)" "unreg" 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 GhcUnregisterised = YES
GhcWithNativeCodeGen = NO GhcWithNativeCodeGen = NO
SRC_HC_OPTS = -O -H64m SRC_HC_OPTS = -O -H64m # -fllvm
GhcStage1HcOpts = -O GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2 GhcStage2HcOpts = -O2
GhcHcOpts = -Rghc-timing GhcHcOpts = -Rghc-timing
...@@ -173,3 +197,4 @@ endif ...@@ -173,3 +197,4 @@ endif
# NoFib settings # NoFib settings
NoFibWays = NoFibWays =
STRIP_CMD = : STRIP_CMD = :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment