9a71ac28a1325e723bcb30b075658fbf8c315760
[hadrian.git] / src / Settings / User.hs
1 module Settings.User (
2 userArgs, userPackages, userLibWays, userRtsWays, userTargetDirectory,
3 userKnownPackages, integerLibrary,
4 trackBuildSystem, buildHaddock, validating, ghciWithDebugger, ghcProfiled,
5 ghcDebugged, dynamicGhcPrograms, laxDependencies
6 ) where
7
8 import Expression
9 import Predicates
10
11 -- No user-specific settings by default
12 -- TODO: rename to userArgs
13 userArgs :: Args
14 userArgs = mempty
15
16 -- Control which packages get to be built
17 userPackages :: Packages
18 userPackages = remove [ghc]
19
20 -- Add new user-defined packages
21 userKnownPackages :: [Package]
22 userKnownPackages = []
23
24 -- Control which ways libraries and rts are built
25 userLibWays :: Ways
26 userLibWays = mempty
27
28 userRtsWays :: Ways
29 userRtsWays = mempty
30
31 -- Control where build results go (see Settings.Default for an example)
32 userTargetDirectory :: Stage -> Package -> FilePath
33 userTargetDirectory = defaultTargetDirectory
34
35 -- Choose integer library: integerGmp, integerGmp2 or integerSimple
36 integerLibrary :: Package
37 integerLibrary = integerGmp
38
39 -- User-defined flags. Note the following type semantics:
40 -- * Bool: a plain Boolean flag whose value is known at compile time
41 -- * Action Bool: a flag whose value can depend on the build environment
42 -- * Predicate: a flag depending on the build environment and the current target
43
44 -- Set this to True if you are making any changes in the build system and want
45 -- appropriate rebuilds to be initiated. Switching this to False speeds things
46 -- up a little (particularly zero builds).
47 -- WARNING: a complete rebuild is required when changing this setting.
48 trackBuildSystem :: Bool
49 trackBuildSystem = True
50
51 validating :: Bool
52 validating = False
53
54 dynamicGhcPrograms :: Bool
55 dynamicGhcPrograms = False
56
57 ghciWithDebugger :: Bool
58 ghciWithDebugger = False
59
60 ghcProfiled :: Bool
61 ghcProfiled = False
62
63 -- TODO: do we need to be able to set this from command line?
64 ghcDebugged :: Bool
65 ghcDebugged = False
66
67 -- When laxDependencies flag is set to True, dependencies on the GHC executable
68 -- are turned into order-only dependencies to avoid needless recompilation when
69 -- making changes to GHC's sources. In certain situations this can lead to build
70 -- failures, in which case you should reset the flag (at least temporarily).
71 laxDependencies :: Bool
72 laxDependencies = False
73
74 buildHaddock :: Predicate
75 buildHaddock = return True