Commit b40e5595 authored by thomie's avatar thomie

Build system: simplify *-llvm BuildFlavours (#10223)

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
parent 2c24fd70
......@@ -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
......
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
......
SRC_HC_OPTS = -O -H64m -fllvm
GhcStage1HcOpts = -O -fllvm
GhcStage2HcOpts = -O2 -fllvm
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcLibHcOpts = -O2
BUILD_PROF_LIBS = YES
#SplitObjs
......
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
......
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