[commit: ghc] ghc-7.8: ghc.mk: fix list for dll-split on GHCi-less builds (04b3b14)

git at git.haskell.org git at git.haskell.org
Mon Dec 15 14:55:13 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/04b3b14c2cab2f7b833a6814de7e3fd6554e7b8a/ghc

>---------------------------------------------------------------

commit 04b3b14c2cab2f7b833a6814de7e3fd6554e7b8a
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Sat Oct 4 20:48:22 2014 +0100

    ghc.mk: fix list for dll-split on GHCi-less builds
    
    To reproduce build failure it's enough to try
    to build GHC on amd64 with the following setup:
    
        $ cat mk/build.mk
        # for #9552
        GhcWithInterpreter = NO
    
    It gives:
    
        Reachable modules from DynFlags out of date
        Please fix compiler/ghc.mk, or building DLLs on Windows may break (#7780)
        Redundant modules: Bitmap BlockId ... <list of 42 modules>
        <make error>
    
    dll-split among other things makes sure
    all mentioned modules are used by DynFlags.
    '#ifdef GHCI' keeps is from happening.
    
    Patch moves those 42 modules under
    'GhcWithInterpreter' guard.
    
    Fixes Issue #9552
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
    (cherry picked from commit 2a8ea4745d6ff79d6ce17961a64d9013243fc3c6)


>---------------------------------------------------------------

04b3b14c2cab2f7b833a6814de7e3fd6554e7b8a
 compiler/ghc.mk | 90 ++++++++++++++++++++++++++++++---------------------------
 1 file changed, 48 insertions(+), 42 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 389543f..58b5ab3 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -461,36 +461,15 @@ compiler_stage2_dll0_MODULES = \
 	BasicTypes \
 	BinIface \
 	Binary \
-	Bitmap \
-	BlockId \
 	BooleanFormula \
 	BreakArray \
 	BufWrite \
 	BuildTyCl \
-	ByteCodeAsm \
-	ByteCodeInstr \
-	ByteCodeItbls \
-	CLabel \
 	Class \
 	CmdLineParser \
-	Cmm \
-	CmmCallConv \
-	CmmExpr \
-	CmmInfo \
-	CmmMachOp \
-	CmmNode \
 	CmmType \
-	CmmUtils \
 	CoAxiom \
 	ConLike \
-	CodeGen.Platform \
-	CodeGen.Platform.ARM \
-	CodeGen.Platform.NoRegs \
-	CodeGen.Platform.PPC \
-	CodeGen.Platform.PPC_Darwin \
-	CodeGen.Platform.SPARC \
-	CodeGen.Platform.X86 \
-	CodeGen.Platform.X86_64 \
 	Coercion \
 	Config \
 	Constants \
@@ -514,7 +493,6 @@ compiler_stage2_dll0_MODULES = \
 	Exception \
 	ExtsCompat46 \
 	FamInstEnv \
-	FastBool \
 	FastFunctions \
 	FastMutInt \
 	FastString \
@@ -524,8 +502,6 @@ compiler_stage2_dll0_MODULES = \
 	FiniteMap \
 	ForeignCall \
 	Hooks \
-	Hoopl \
-	Hoopl.Dataflow \
 	HsBinds \
 	HsDecls \
 	HsDoc \
@@ -544,14 +520,12 @@ compiler_stage2_dll0_MODULES = \
 	IfaceSyn \
 	IfaceType \
 	InstEnv \
-	InteractiveEvalTypes \
 	Kind \
 	ListSetOps \
 	Literal \
 	LoadIface \
 	Maybes \
 	MkCore \
-	MkGraph \
 	MkId \
 	Module \
 	MonadUtils \
@@ -571,9 +545,6 @@ compiler_stage2_dll0_MODULES = \
 	PipelineMonad \
 	Platform \
 	PlatformConstants \
-	PprCmm \
-	PprCmmDecl \
-	PprCmmExpr \
 	PprCore \
 	PrelInfo \
 	PrelNames \
@@ -581,23 +552,10 @@ compiler_stage2_dll0_MODULES = \
 	Pretty \
 	PrimOp \
 	RdrName \
-	Reg \
-	RegClass \
 	Rules \
-	SMRep \
 	Serialized \
 	SrcLoc \
 	StaticFlags \
-	StgCmmArgRep \
-	StgCmmClosure \
-	StgCmmEnv \
-	StgCmmLayout \
-	StgCmmMonad \
-	StgCmmProf \
-	StgCmmTicky \
-	StgCmmUtils \
-	StgSyn \
-	Stream \
 	StringBuffer \
 	TcEvidence \
 	TcIface \
@@ -621,6 +579,54 @@ compiler_stage2_dll0_MODULES = \
 	VarEnv \
 	VarSet
 
+ifeq "$(GhcWithInterpreter)" "YES"
+# These files are reacheable from DynFlags
+# only by GHCi-enabled code (see #9552)
+compiler_stage2_dll0_MODULES += \
+	Bitmap \
+	BlockId \
+	ByteCodeAsm \
+	ByteCodeInstr \
+	ByteCodeItbls \
+	CLabel \
+	Cmm \
+	CmmCallConv \
+	CmmExpr \
+	CmmInfo \
+	CmmMachOp \
+	CmmNode \
+	CmmUtils \
+	CodeGen.Platform \
+	CodeGen.Platform.ARM \
+	CodeGen.Platform.NoRegs \
+	CodeGen.Platform.PPC \
+	CodeGen.Platform.PPC_Darwin \
+	CodeGen.Platform.SPARC \
+	CodeGen.Platform.X86 \
+	CodeGen.Platform.X86_64 \
+	FastBool \
+	Hoopl \
+	Hoopl.Dataflow \
+	InteractiveEvalTypes \
+	MkGraph \
+	PprCmm \
+	PprCmmDecl \
+	PprCmmExpr \
+	Reg \
+	RegClass \
+	SMRep \
+	StgCmmArgRep \
+	StgCmmClosure \
+	StgCmmEnv \
+	StgCmmLayout \
+	StgCmmMonad \
+	StgCmmProf \
+	StgCmmTicky \
+	StgCmmUtils \
+	StgSyn \
+	Stream
+endif
+
 compiler_stage2_dll0_HS_OBJS = \
     $(patsubst %,compiler/stage2/build/%.$(dyn_osuf),$(subst .,/,$(compiler_stage2_dll0_MODULES)))
 



More information about the ghc-commits mailing list