[commit: ghc] wip/nfs-locking: Move libffi build to Stage1. (48d0ee0)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:56:33 UTC 2017


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

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

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

commit 48d0ee0e397abc8fb447db6e3c858b4d5be2f863
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Jan 23 17:04:11 2016 +0000

    Move libffi build to Stage1.
    
    Should make AppVeyor CI fit in 1 hr.


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

48d0ee0e397abc8fb447db6e3c858b4d5be2f863
 src/Rules/Generate.hs | 15 ++++++---------
 src/Rules/Libffi.hs   |  5 ++---
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index f329228..d98527c 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -43,13 +43,6 @@ includesDependencies = ("includes" -/-) <$>
     , "ghcplatform.h"
     , "ghcversion.h" ]
 
-defaultDependencies :: Stage -> [FilePath]
-defaultDependencies stage = concat
-    [ includesDependencies
-    , libffiDependencies ]
-    ++
-    [ gmpLibraryH | stage > Stage0 ]
-
 ghcPrimDependencies :: Stage -> [FilePath]
 ghcPrimDependencies stage = ((targetPath stage ghcPrim -/- "build") -/-) <$>
        [ "GHC/PrimopWrappers.hs"
@@ -68,7 +61,10 @@ derivedConstantsDependencies = installTargets ++ fmap (derivedConstantsPath -/-)
 compilerDependencies :: Stage -> [FilePath]
 compilerDependencies stage =
     [ platformH stage ]
-    ++ defaultDependencies stage ++ derivedConstantsDependencies
+    ++ includesDependencies
+    ++ [ gmpLibraryH | stage > Stage0 ]
+    ++ filter (const $ stage > Stage0) libffiDependencies
+    ++ derivedConstantsDependencies
     ++ fmap ((targetPath stage compiler -/- "build") -/-)
        [ "primop-vector-uniques.hs-incl"
        , "primop-data-decl.hs-incl"
@@ -86,13 +82,14 @@ compilerDependencies stage =
        , "primop-vector-tycons.hs-incl"
        , "primop-vector-tys.hs-incl" ]
 
+-- TODO: Turn this into a FilePaths expression
 generatedDependencies :: Stage -> Package -> [FilePath]
 generatedDependencies stage pkg
     | pkg   == compiler = compilerDependencies stage
     | pkg   == ghcPrim  = ghcPrimDependencies stage
     | pkg   == rts      = libffiDependencies ++ includesDependencies
                        ++ derivedConstantsDependencies
-    | stage == Stage0   = defaultDependencies Stage0
+    | stage == Stage0   = includesDependencies
     | otherwise         = []
 
 -- The following generators and corresponding source extensions are supported:
diff --git a/src/Rules/Libffi.hs b/src/Rules/Libffi.hs
index 0f4e05a..d2742eb 100644
--- a/src/Rules/Libffi.hs
+++ b/src/Rules/Libffi.hs
@@ -19,10 +19,10 @@ libffiDependencies :: [FilePath]
 libffiDependencies = (rtsBuildPath -/-) <$> [ "ffi.h", "ffitarget.h" ]
 
 libffiTarget :: PartialTarget
-libffiTarget = PartialTarget Stage0 libffi
+libffiTarget = PartialTarget Stage1 libffi
 
 libffiBuild :: FilePath
-libffiBuild = buildRootPath -/- "stage0/libffi"
+libffiBuild = buildRootPath -/- "stage1/libffi"
 
 libffiLibrary :: FilePath
 libffiLibrary = libffiBuild -/- "inst/lib/libffi.a"
@@ -33,7 +33,6 @@ fixLibffiMakefile =
     . replace "@toolexeclibdir@" "$(libdir)"
     . replace "@INSTALL@" "$(subst ../install-sh,C:/msys/home/chEEtah/ghc/install-sh, at INSTALL@)"
 
-
 -- TODO: remove code duplication (see Settings/Builders/GhcCabal.hs)
 configureEnvironment :: Action [CmdOption]
 configureEnvironment = do



More information about the ghc-commits mailing list