diff options
-rw-r--r-- | mk/build.mk.sample | 27 |
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 = : + |