Build system: simplify *-llvm BuildFlavours (#10223)
authorThomas Miedema <thomasmiedema@gmail.com>
Tue, 25 Aug 2015 15:49:32 +0000 (17:49 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Mon, 7 Sep 2015 09:56:55 +0000 (11:56 +0200)
Note that SRC_HC_OPTS are added to every Haskell compilation. So
there isn't any need to also add `-fllvm` to GhcStage1HcOpts,
GhcStage2HcOpts and GhcLibHcOpts.

Small bug fix: make sure we test for -fllvm in SRC_HC_OPTS, to check
whether the bootstrap compiler is affected by bug #9439.

Reviewed by: austin

Differential Revision: https://phabricator.haskell.org/D1188

Makefile
mk/flavours/bench-llvm.mk
mk/flavours/perf-llvm.mk
mk/flavours/quick-llvm.mk

index 217205c..38c7eb9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -71,7 +71,7 @@ include mk/custom-settings.mk
 
 # Verify that stage 0 LLVM backend isn't affected by Bug #9439 if needed
 ifeq "$(GHC_LLVM_AFFECTED_BY_9439)" "1"
-ifneq "$(findstring -fllvm,$(GhcHcOpts) $(GhcStage1HcOpts))" ""
+ifneq "$(findstring -fllvm,$(SRC_HC_OPTS) $(GhcHcOpts) $(GhcStage1HcOpts))" ""
 $(error Stage 0 compiler is affected by Bug #9439. Refusing to bootstrap with -fllvm)
 endif
 endif
index 99957b9..816d7c7 100644 (file)
@@ -1,7 +1,7 @@
-SRC_HC_OPTS        = -O -H64m
-GhcStage1HcOpts    = -O -fllvm
-GhcStage2HcOpts    = -O0 -fllvm
-GhcLibHcOpts       = -O2 -fllvm
+SRC_HC_OPTS        = -O -H64m -fllvm
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O0
+GhcLibHcOpts       = -O2
 BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
index 581037f..c49849f 100644 (file)
@@ -1,6 +1,6 @@
 SRC_HC_OPTS        = -O -H64m -fllvm
-GhcStage1HcOpts    = -O -fllvm
-GhcStage2HcOpts    = -O2 -fllvm
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O2
 GhcLibHcOpts       = -O2
 BUILD_PROF_LIBS    = YES
 #SplitObjs
index 90ccb7a..e565327 100644 (file)
@@ -1,7 +1,7 @@
 SRC_HC_OPTS        = -O0 -H64m -fllvm
-GhcStage1HcOpts    = -O -fllvm
-GhcStage2HcOpts    = -O0 -fllvm
-GhcLibHcOpts       = -O -fllvm
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O0
+GhcLibHcOpts       = -O
 BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO