Commit 48d0ee0e authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Move libffi build to Stage1.

Should make AppVeyor CI fit in 1 hr.
parent 3f74e8bf
......@@ -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:
......
......@@ -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,@INSTALL@)"
-- TODO: remove code duplication (see Settings/Builders/GhcCabal.hs)
configureEnvironment :: Action [CmdOption]
configureEnvironment = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment