Kill inaccessible-branch complaints in record update
[ghc.git] / compiler / ghc.mk
index 9f45a51..ce41eca 100644 (file)
@@ -233,7 +233,7 @@ compiler/stage3/$(PLATFORM_H) : compiler/stage2/$(PLATFORM_H)
        "$(CP)" $< $@
 
 # ----------------------------------------------------------------------------
-#              Generate supporting stuff for prelude/PrimOp.lhs
+#              Generate supporting stuff for prelude/PrimOp.hs
 #              from prelude/primops.txt
 
 PRIMOP_BITS_NAMES = primop-data-decl.hs-incl        \
@@ -259,6 +259,11 @@ PRIMOP_BITS_STAGE3 = $(addprefix compiler/stage3/build/,$(PRIMOP_BITS_NAMES))
 compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
 compiler_CPP_OPTS += ${GhcCppOpts}
 
+# We add these paths to the Haskell compiler's #include search path list since
+# we must avoid #including files by paths relative to the source file as Hadrian
+# moves the build artifacts out of the source tree. See #8040.
+compiler_HC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
+
 define preprocessCompilerFiles
 # $0 = stage
 compiler/stage$1/build/primops.txt: compiler/prelude/primops.txt.pp compiler/stage$1/$$(PLATFORM_H)
@@ -429,6 +434,7 @@ compiler_stage2_dll0_MODULES = \
        Bag \
        BasicTypes \
        Binary \
+       BinFingerprint \
        BooleanFormula \
        BufWrite \
        Class \
@@ -482,12 +488,16 @@ compiler_stage2_dll0_MODULES = \
        HsUtils \
        HscTypes \
        IOEnv \
+  NameCache \
        Id \
        IdInfo \
        IfaceSyn \
        IfaceType \
+       Json            \
+       ToIface \
        InstEnv \
        Kind \
+       KnownUniques \
        Lexeme \
        ListSetOps \
        Literal \
@@ -517,11 +527,12 @@ compiler_stage2_dll0_MODULES = \
        PrelRules \
        Pretty \
        PrimOp \
+       RepType \
        RdrName \
        Rules \
        SrcLoc \
-       StaticFlags \
        StringBuffer \
+       SysTools.Terminal \
        TcEvidence \
        TcRnTypes \
        TcType \