summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2017-08-01 11:05:18 -0400
committerBen Gamari <ben@smart-cactus.org>2017-08-01 16:04:54 -0400
commit36fe21aa3fe5abe1cef0104b20c296ac9385658d (patch)
treefccb49998e3e4c961e1f2c9e4d3000ae394bfd60 /ghc.mk
parentc13720c8c6047844f659ad4ce684946b80c99bee (diff)
downloadhaskell-36fe21aa3fe5abe1cef0104b20c296ac9385658d.tar.gz
Enable building Cabal with parsec
Cabal's parser has been rewritten in terms of Parsec (which is not enabled yet in Cabal-2.0 by default, but can be enabled by a cabal flag). The plan for Cabal is to drop support for the non-parsec parser, so we need to prepare GHC to cope with new situation. However, this means that lib:Cabal requires three new library dependency submodules, - parsec - text - mtl What complicates matters is that we need to build `ghc-cabal` early on during the bootstrap phase which currently needs to invoke `ghc --make` directly. So these additional dependencies need to be integrated into the monolithic `ghc --make` invocation which produces the `ghc-cabal` executable. Test Plan: `./validate --fast` passed Reviewers: austin, bgamari Subscribers: erikd, phadej, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3757
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/ghc.mk b/ghc.mk
index 4eb1658174..55cc1197c5 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -430,7 +430,7 @@ else # CLEANING
# programs such as GHC and ghc-pkg, that we do not assume the stage0
# compiler already has installed (or up-to-date enough).
-PACKAGES_STAGE0 = binary Cabal/Cabal hpc ghc-boot-th ghc-boot transformers template-haskell ghci
+PACKAGES_STAGE0 = binary text transformers mtl parsec Cabal/Cabal hpc ghc-boot-th ghc-boot template-haskell ghci
ifeq "$(Windows_Host)" "NO"
PACKAGES_STAGE0 += terminfo
endif
@@ -457,11 +457,17 @@ PACKAGES_STAGE1 += process
PACKAGES_STAGE1 += hpc
PACKAGES_STAGE1 += pretty
PACKAGES_STAGE1 += binary
+PACKAGES_STAGE1 += text
+PACKAGES_STAGE1 += transformers
+PACKAGES_STAGE1 += mtl
+PACKAGES_STAGE1 += parsec
+# temporary until Cabal switches to parsec mode by default
+libraries/Cabal/Cabal_dist-boot_CONFIGURE_OPTS += --flag parsec
+libraries/Cabal/Cabal_dist-install_CONFIGURE_OPTS += --flag parsec
PACKAGES_STAGE1 += Cabal/Cabal
PACKAGES_STAGE1 += ghc-boot-th
PACKAGES_STAGE1 += ghc-boot
PACKAGES_STAGE1 += template-haskell
-PACKAGES_STAGE1 += transformers
PACKAGES_STAGE1 += ghc-compact
ifeq "$(HADDOCK_DOCS)" "YES"
@@ -1264,6 +1270,7 @@ $(eval $(call sdist-ghc-file,compiler,stage2,parser,Parser,y))
$(eval $(call sdist-ghc-file,utils/hpc,dist-install,,HpcParser,y))
$(eval $(call sdist-ghc-file,utils/genprimopcode,dist,,Lexer,x))
$(eval $(call sdist-ghc-file,utils/genprimopcode,dist,,Parser,y))
+$(eval $(call sdist-ghc-file2,libraries/Cabal/Cabal,dist-install,Distribution/Parsec,Lexer,x))
.PHONY: sdist-ghc-prep
sdist-ghc-prep : sdist-ghc-prep-tree