[commit: ghc] wip/nfs-locking: Add ghc-bin package. (6a0c30f)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:22:35 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/6a0c30ff7dad21754967ab9178e7ad3b88c1598d/ghc

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

commit 6a0c30ff7dad21754967ab9178e7ad3b88c1598d
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Sep 24 23:47:18 2015 +0100

    Add ghc-bin package.


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

6a0c30ff7dad21754967ab9178e7ad3b88c1598d
 src/GHC.hs                        | 18 ++++++++++--------
 src/Settings/Builders/GhcCabal.hs |  6 ++++++
 src/Settings/Packages.hs          |  6 +++---
 src/Settings/User.hs              |  2 +-
 4 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/src/GHC.hs b/src/GHC.hs
index 8f25c7c..c277c6a 100644
--- a/src/GHC.hs
+++ b/src/GHC.hs
@@ -1,8 +1,8 @@
 module GHC (
     array, base, binPackageDb, binary, bytestring, cabal, compiler, containers,
-    deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc, integerGmp,
-    integerSimple, parallel, pretty, primitive, process, stm, templateHaskell,
-    terminfo, time, transformers, unix, win32, xhtml,
+    deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl, hpc,
+    integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
+    templateHaskell, terminfo, time, transformers, unix, win32, xhtml,
 
     defaultKnownPackages, defaultTargetDirectory
     ) where
@@ -18,15 +18,15 @@ import Stage
 defaultKnownPackages :: [Package]
 defaultKnownPackages =
     [ array, base, binPackageDb, binary, bytestring, cabal, compiler
-    , containers, deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc
-    , integerGmp, integerSimple, parallel, pretty, primitive, process, stm
+    , containers, deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl
+    , hpc, integerGmp, integerSimple, parallel, pretty, primitive, process, stm
     , templateHaskell, terminfo, time, transformers, unix, win32, xhtml ]
 
 -- Package definitions
 array, base, binPackageDb, binary, bytestring, cabal, compiler, containers,
-    deepseq, directory, filepath, ghcPrim, haskeline, hoopl, hpc, integerGmp,
-    integerSimple, parallel, pretty, primitive, process, stm, templateHaskell,
-    terminfo, time, transformers, unix, win32, xhtml :: Package
+    deepseq, directory, filepath, ghc, ghcPrim, haskeline, hoopl, hpc,
+    integerGmp, integerSimple, parallel, pretty, primitive, process, stm,
+    templateHaskell, terminfo, time, transformers, unix, win32, xhtml :: Package
 
 array           = library  "array"
 base            = library  "base"
@@ -39,6 +39,7 @@ containers      = library  "containers"
 deepseq         = library  "deepseq"
 directory       = library  "directory"
 filepath        = library  "filepath"
+ghc             = topLevel "ghc-bin"        `setPath` "ghc"
 ghcPrim         = library  "ghc-prim"
 haskeline       = library  "haskeline"
 hoopl           = library  "hoopl"
@@ -67,5 +68,6 @@ xhtml           = library  "xhtml"
 defaultTargetDirectory :: Stage -> Package -> FilePath
 defaultTargetDirectory stage package
     | package == compiler = "stage" ++ show (fromEnum stage + 1)
+    | package == ghc      = "stage" ++ show (fromEnum stage + 1)
     | stage   == Stage0   = "dist-boot"
     | otherwise           = "dist-install"
diff --git a/src/Settings/Builders/GhcCabal.hs b/src/Settings/Builders/GhcCabal.hs
index b68da27..582a56c 100644
--- a/src/Settings/Builders/GhcCabal.hs
+++ b/src/Settings/Builders/GhcCabal.hs
@@ -166,6 +166,12 @@ customPackageArgs = do
                   , ghcProfiled ?
                     notStage0 ? arg "--ghc-pkg-option=--force"
                   ]
+        , package ghc ?
+          builder GhcCabal ?
+          mconcat [ arg $ "--flags=stage" ++ show nextStage
+                  , ghcWithInterpreter ?
+                    notStage0 ? arg "--flags=ghci"
+                  ]
         ]
 
 withBuilderKey :: Builder -> String
diff --git a/src/Settings/Packages.hs b/src/Settings/Packages.hs
index dee0c95..8b913f5 100644
--- a/src/Settings/Packages.hs
+++ b/src/Settings/Packages.hs
@@ -16,7 +16,7 @@ defaultPackages = mconcat
 
 packagesStage0 :: Packages
 packagesStage0 = mconcat
-    [ append [ binPackageDb, binary, cabal, compiler, hoopl, hpc, transformers ]
+    [ append [ binPackageDb, binary, cabal, compiler, ghc, hoopl, hpc, transformers ]
     , notM windowsHost ? notM (anyHostOs ["ios"]) ? append [terminfo] ]
 
 -- TODO: what do we do with parallel, stm, random, primitive, vector and dph?
@@ -24,8 +24,8 @@ packagesStage1 :: Packages
 packagesStage1 = mconcat
     [ packagesStage0
     , append [ array, base, bytestring, containers, deepseq, directory
-             , filepath, ghcPrim, haskeline, integerLibrary, pretty, process
-             , templateHaskell, time ]
+             , filepath, ghc, ghcPrim, haskeline, integerLibrary, pretty
+             , process, templateHaskell, time ]
     , windowsHost      ? append [win32]
     , notM windowsHost ? append [unix]
     , buildHaddock     ? append [xhtml] ]
diff --git a/src/Settings/User.hs b/src/Settings/User.hs
index 5b62e39..9a71ac2 100644
--- a/src/Settings/User.hs
+++ b/src/Settings/User.hs
@@ -15,7 +15,7 @@ userArgs = mempty
 
 -- Control which packages get to be built
 userPackages :: Packages
-userPackages = mempty
+userPackages = remove [ghc]
 
 -- Add new user-defined packages
 userKnownPackages :: [Package]



More information about the ghc-commits mailing list