[commit: ghc] master: Fix ghc-cabal build (#455) (94dbe9d)
git at git.haskell.org
git at git.haskell.org
Tue Oct 23 20:11:47 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/94dbe9d711cc7e6e972bd5370b5d767cc5a5d840/ghc
>---------------------------------------------------------------
commit 94dbe9d711cc7e6e972bd5370b5d767cc5a5d840
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sat Nov 11 14:47:51 2017 +0000
Fix ghc-cabal build (#455)
See #395, #453
>---------------------------------------------------------------
94dbe9d711cc7e6e972bd5370b5d767cc5a5d840
cabal.project | 8 ++++++--
src/Settings/Packages/GhcCabal.hs | 11 +++++++++--
stack.yaml | 4 ++++
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/cabal.project b/cabal.project
index 1ef81ca..317094f 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,2 +1,6 @@
-packages: ../libraries/Cabal/Cabal/
- ./
+packages: ./
+ ../libraries/Cabal/Cabal/
+ ../libraries/filepath/
+ ../libraries/text/
+ ../libraries/hpc/
+ ../libraries/parsec/
diff --git a/src/Settings/Packages/GhcCabal.hs b/src/Settings/Packages/GhcCabal.hs
index 7d2e99e..0e915b3 100644
--- a/src/Settings/Packages/GhcCabal.hs
+++ b/src/Settings/Packages/GhcCabal.hs
@@ -11,14 +11,21 @@ ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
cabalDeps <- expr $ stage1Dependencies cabal
cabalVersion <- expr $ pkgVersion (unsafePkgCabalFile cabal) -- TODO: improve
mconcat
- [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps, pkg /= parsec ]
+ [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps \\ [parsec, mtl] ]
, arg "--make"
, arg "-j"
, pure ["-Wall", "-fno-warn-unused-imports", "-fno-warn-warnings-deprecations"]
, arg ("-DCABAL_VERSION=" ++ replace "." "," cabalVersion)
+ , arg "-DCABAL_PARSEC"
, arg "-DBOOTSTRAPPING"
, arg "-DMIN_VERSION_binary_0_8_0"
+ , arg "libraries/text/cbits/cbits.c"
, arg "-ilibraries/Cabal/Cabal"
, arg "-ilibraries/binary/src"
, arg "-ilibraries/filepath"
- , arg "-ilibraries/hpc" ]
+ , arg "-ilibraries/hpc"
+ , arg "-ilibraries/mtl"
+ , arg "-ilibraries/text"
+ , arg "-Ilibraries/text/include"
+ , arg "-ilibraries/parsec" ]
+
diff --git a/stack.yaml b/stack.yaml
index da03763..a1b7413 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -7,6 +7,10 @@ resolver: lts-9.0
packages:
- '.'
- '../libraries/Cabal/Cabal'
+- '../libraries/filepath/'
+- '../libraries/text/'
+- '../libraries/hpc/'
+- '../libraries/parsec/'
extra-deps:
- shake-0.16
More information about the ghc-commits
mailing list