Commit 9580d018 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Depend on ghc-split only when building with split objects.

See #81. [skip ci]
parent 901105e5
......@@ -42,8 +42,10 @@ includesDependencies = ("includes" -/-) <$>
, "ghcversion.h" ]
defaultDependencies :: [FilePath]
defaultDependencies =
includesDependencies ++ libffiDependencies ++ integerGmpDependencies
defaultDependencies = concat
[ includesDependencies
, libffiDependencies
, integerGmpDependencies ]
ghcPrimDependencies :: Stage -> [FilePath]
ghcPrimDependencies stage = ((targetPath stage ghcPrim -/- "build") -/-) <$>
......@@ -77,7 +79,6 @@ compilerDependencies stage =
, "primop-vector-tys-exports.hs-incl"
, "primop-vector-tycons.hs-incl"
, "primop-vector-tys.hs-incl" ]
++ ["inplace/lib/bin/ghc-split"]
generatedDependencies :: Stage -> Package -> [FilePath]
generatedDependencies stage pkg
......
......@@ -26,7 +26,7 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
, notStage0 ? arg "-O2"
, arg "-Wall"
, arg "-fwarn-tabs"
, splitObjects ? arg "-split-objs"
, splitObjectsArgs
, not buildObj ? arg "-no-auto-link-packages"
, not buildObj ? append [ "-optl-l" ++ lib | lib <- libs ]
, not buildObj ? append [ "-optl-L" ++ dir | dir <- libDirs ]
......@@ -34,6 +34,11 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
, append =<< getInputs
, arg "-o", arg =<< getOutput ]
splitObjectsArgs :: Args
splitObjectsArgs = splitObjects ? do
lift $ need ["inplace/lib/bin/ghc-split"]
arg "-split-objs"
ghcMBuilderArgs :: Args
ghcMBuilderArgs = stagedBuilder GhcM ? do
ways <- getWays
......
Supports Markdown
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