Commit 391a299a authored by Ian Lynagh's avatar Ian Lynagh

Fix making it possible to build without the NCG

If
    GhcWithNativeCodeGen = NO
then we don't build the NCG modules, and we define OMIT_NATIVE_CODEGEN
parent b9d13108
......@@ -80,6 +80,14 @@ CONFIGURE_FLAGS_STAGE2 += --flags=-stage1
CONFIGURE_FLAGS_STAGE1 += --flags=-ghci
ifeq "$(GhcWithNativeCodeGen)" "YES"
CONFIGURE_FLAGS_STAGE1 += --flags=ncg
CONFIGURE_FLAGS_STAGE2 += --flags=ncg
else
CONFIGURE_FLAGS_STAGE1 += --flags=-ncg
CONFIGURE_FLAGS_STAGE2 += --flags=-ncg
endif
ifeq "$(GhcWithInterpreter)" "YES"
CONFIGURE_FLAGS_STAGE2 += --flags=ghci
......
......@@ -26,6 +26,9 @@ Flag editline
Flag ghci
Description: Build GHCi support.
Flag ncg
Description: Build the NCG.
Flag stage1
Description: Is this stage 1?
......@@ -60,6 +63,9 @@ Library
CPP-Options: -DGHCI
Include-Dirs: ../libffi/build/include
if !flag(ncg)
CPP-Options: -DOMIT_NATIVE_CODEGEN
-- GHC 6.4.2 needs to be able to find WCsubst.c, which needs to be
-- able to find WCsubst.h
Include-Dirs: ../libraries/base/cbits, ../libraries/base/include
......@@ -98,7 +104,6 @@ Library
hsSyn
iface
main
nativeGen
parser
prelude
profiling
......@@ -269,24 +274,6 @@ Library
StaticFlags
SysTools
TidyPgm
AsmCodeGen
MachCodeGen
MachInstrs
MachRegs
NCGMonad
PositionIndependentCode
PprMach
RegAllocColor
RegAllocInfo
RegAllocLinear
RegAllocStats
RegArchBase
RegArchX86
RegCoalesce
RegLiveness
RegSpill
RegSpillClean
RegSpillCost
Ctype
HaddockLex
HaddockParse
......@@ -418,6 +405,30 @@ Library
VectUtils
Vectorise
if flag(ncg)
hs-source-dirs:
nativeGen
Exposed-Modules:
AsmCodeGen
MachCodeGen
MachInstrs
MachRegs
NCGMonad
PositionIndependentCode
PprMach
RegAllocColor
RegAllocInfo
RegAllocLinear
RegAllocStats
RegArchBase
RegArchX86
RegCoalesce
RegLiveness
RegSpill
RegSpillClean
RegSpillCost
if flag(ghci)
Exposed-Modules:
DsMeta
......
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