Commit b18f0e3f authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Allow splitObjects to be controlled in Settings/User.hs, see #84.

parent d4e44fb2
......@@ -76,6 +76,7 @@ executable ghc-shake
, Settings.Builders.HsCpp
, Settings.Builders.Ld
, Settings.Builders.Tar
, Settings.Default
, Settings.Packages
, Settings.Packages.Base
, Settings.Packages.Compiler
......
-- | Convenient predicates
module Predicates (
stage, package, builder, stagedBuilder, builderGcc, builderGhc, file, way,
stage0, stage1, stage2, notStage0, notPackage, registerPackage, splitObjects
stage0, stage1, stage2, notStage0, notPackage, registerPackage
) where
import Base
import Expression
import GHC
import Oracles.Config.Flag
-- Basic predicates
stage :: Stage -> Predicate
......@@ -55,11 +53,3 @@ notPackage = notM . package
-- TODO: Actually, we don't register compiler in some circumstances -- fix.
registerPackage :: Predicate
registerPackage = return True
splitObjects :: Predicate
splitObjects = do
goodStage <- notStage0 -- We don't split bootstrap (stage 0) packages
pkg <- getPackage
supported <- lift supportsSplitObjects
let goodPackage = isLibrary pkg && pkg /= compiler && pkg /= rts
return $ goodStage && goodPackage && supported
......@@ -6,7 +6,6 @@ import Base hiding (splitPath)
import Expression
import GHC
import Oracles
import Predicates (splitObjects)
import Rules.Actions
import Rules.IntegerGmp
import Rules.Resources
......
module Settings.Default (defaultSplitObjects) where
import Base
import Expression
import GHC
import Oracles.Config.Flag
import Predicates
defaultSplitObjects :: Predicate
defaultSplitObjects = do
goodStage <- notStage0 -- We don't split bootstrap (stage 0) packages
pkg <- getPackage
supported <- lift supportsSplitObjects
let goodPackage = isLibrary pkg && pkg /= compiler && pkg /= rts
return $ goodStage && goodPackage && supported
......@@ -3,7 +3,7 @@ module Settings.User (
userProgramPath, userKnownPackages, integerLibrary,
trackBuildSystem, buildHaddock, validating, ghciWithDebugger, ghcProfiled,
ghcDebugged, dynamicGhcPrograms, laxDependencies, buildSystemConfigFile,
verboseCommands, turnWarningsIntoErrors
verboseCommands, turnWarningsIntoErrors, splitObjects
) where
import GHC
......@@ -57,6 +57,10 @@ trackBuildSystem = True
validating :: Bool
validating = False
-- To switch off split objects change to 'return False'
splitObjects :: Predicate
splitObjects = return False -- FIXME: should be defaultSplitObjects, see #84.
dynamicGhcPrograms :: Bool
dynamicGhcPrograms = False
......
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