Add test compiler option to test (#621)
[hadrian.git] / src / UserSettings.hs
1 -- If you want to customise your build you should copy this file from
2 -- hadrian/src/UserSettings.hs to hadrian/UserSettings.hs and edit your copy.
3 -- If you don't copy the file your changes will be tracked by git and you can
4 -- accidentally commit them.
5 module UserSettings (
6 userFlavours, userPackages, verboseCommand,
7 buildProgressColour, successColour, stage1Only
8 ) where
9
10 import Flavour
11 import Expression
12 import {-# SOURCE #-} Settings.Default
13
14 -- See doc/user-settings.md for instructions.
15 -- Please update doc/user-settings.md when committing changes to this file.
16
17 -- | User-defined build flavours. See 'userFlavour' as an example.
18 userFlavours :: [Flavour]
19 userFlavours = [userFlavour] -- Add more build flavours if need be.
20
21 -- | This is an example user-defined build flavour. Feel free to modify it and
22 -- use by passing @--flavour=user@ from the command line.
23 userFlavour :: Flavour
24 userFlavour = defaultFlavour { name = "user" } -- Modify other settings here.
25
26 -- | Add user-defined packages. Note, this only lets Hadrian know about the
27 -- existence of a new package; to actually build it you need to create a new
28 -- build flavour, modifying the list of packages that are built by default.
29 userPackages :: [Package]
30 userPackages = []
31
32 -- | Set to 'True' to print full command lines during the build process. Note:
33 -- this is a 'Predicate', hence you can enable verbose output only for certain
34 -- targets, e.g.: @verboseCommand = package ghcPrim@.
35 verboseCommand :: Predicate
36 verboseCommand = do
37 verbosity <- expr getVerbosity
38 return $ verbosity >= Loud
39
40 -- | Set colour for build progress messages (e.g. executing a build command).
41 buildProgressColour :: BuildProgressColour
42 buildProgressColour = mkBuildProgressColour (Dull Magenta)
43
44 -- | Set colour for success messages (e.g. a package is built successfully).
45 successColour :: SuccessColour
46 successColour = mkSuccessColour (Dull Green)
47
48 -- TODO: Set this flag from the command line.
49 -- | Set this flag to 'True' to disable building Stage2 GHC (i.e. the @ghc-stage2@
50 -- executable) and Stage2 utilities (such as @haddock@). Note that all Stage0
51 -- and Stage1 libraries (including 'compiler') will still be built. Enabling
52 -- this flag during installation leads to installing @ghc-stage1@ instead of
53 -- @ghc-stage2@, and @ghc-pkg@ that was build with the Stage0 compiler.
54 -- Also see Note [No stage2 packages when CrossCompiling or Stage1Only] in the
55 -- top-level @ghc.mk@.
56 stage1Only :: Bool
57 stage1Only = False