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