[commit: ghc] wip/new-flatten-skolems-Aug14: ghc.mk: fix list for dll-split on GHCi-less builds (db8ebc1)

git at git.haskell.org git at git.haskell.org
Thu Oct 9 07:38:32 UTC 2014


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

On branch  : wip/new-flatten-skolems-Aug14
Link       : http://ghc.haskell.org/trac/ghc/changeset/db8ebc11955bf66760d40e942e49732f1eef9ab2/ghc

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

commit db8ebc11955bf66760d40e942e49732f1eef9ab2
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>


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

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

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 05c935f..8e00149 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -467,36 +467,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 \
@@ -520,7 +499,6 @@ compiler_stage2_dll0_MODULES = \
 	Exception \
 	ExtsCompat46 \
 	FamInstEnv \
-	FastBool \
 	FastFunctions \
 	FastMutInt \
 	FastString \
@@ -530,8 +508,6 @@ compiler_stage2_dll0_MODULES = \
 	FiniteMap \
 	ForeignCall \
 	Hooks \
-	Hoopl \
-	Hoopl.Dataflow \
 	HsBinds \
 	HsDecls \
 	HsDoc \
@@ -551,14 +527,12 @@ compiler_stage2_dll0_MODULES = \
 	IfaceSyn \
 	IfaceType \
 	InstEnv \
-	InteractiveEvalTypes \
 	Kind \
 	ListSetOps \
 	Literal \
 	LoadIface \
 	Maybes \
 	MkCore \
-	MkGraph \
 	MkId \
 	Module \
 	MonadUtils \
@@ -578,9 +552,6 @@ compiler_stage2_dll0_MODULES = \
 	PipelineMonad \
 	Platform \
 	PlatformConstants \
-	PprCmm \
-	PprCmmDecl \
-	PprCmmExpr \
 	PprCore \
 	PrelInfo \
 	PrelNames \
@@ -588,23 +559,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 \
@@ -628,6 +586,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