Do not build DPH when GhcProfiled (fixes #4172)
authorsimonpj@microsoft.com <unknown>
Fri, 13 Aug 2010 14:00:21 +0000 (14:00 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 13 Aug 2010 14:00:21 +0000 (14:00 +0000)
Reason: DPH uses Template Haskell and TH doesn't work
in a profiled compiler

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 5df9e89..fadaccd 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -345,6 +345,10 @@ $(eval $(call addPackage,haskeline))
 $(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg))))
 
 ifneq "$(BootingFromHc)" "YES"
+
+ifneq "$(GhcProfiled)" "YES"
+# DPH uses Template Haskell, and Template Haskell doesn't work
+# with a profiled compiler. So if stage-2 is profile, don't build DPH
 PACKAGES_STAGE2 += \
        dph/dph-base \
        dph/dph-prim-interface \
@@ -353,6 +357,7 @@ PACKAGES_STAGE2 += \
        dph/dph-seq \
        dph/dph-par
 endif
+endif
 
 # We assume that the stage0 compiler has a suitable bytestring package,
 # so we don't have to include it below.