Clean up code, add comments.
[hadrian.git] / src / Settings / Args.hs
1 module Settings.Args (getArgs) where
2
3 import Expression
4 import Settings.User
5 import Settings.Builders.Ar
6 import Settings.Builders.Ld
7 import Settings.Builders.Ghc
8 import Settings.Builders.Gcc
9 import Settings.Builders.GhcPkg
10 import Settings.Builders.Haddock
11 import Settings.Builders.GhcCabal
12
13 getArgs :: Expr [String]
14 getArgs = fromDiffExpr $ defaultArgs <> userArgs
15
16 -- TODO: add all other settings
17 -- TODO: add src-hc-args = -H32m -O
18 -- TODO: GhcStage2HcOpts=-O2 unless GhcUnregisterised
19 -- TODO: compiler/stage1/build/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas
20 -- TODO: compiler/main/GhcMake_HC_OPTS += -auto-all
21 -- TODO: compiler_stage2_HADDOCK_OPTS += --optghc=-DSTAGE=2
22 -- TODO: compiler/prelude/PrimOp_HC_OPTS += -fforce-recomp
23 -- TODO: is GhcHcOpts=-Rghc-timing needed?
24 defaultArgs :: Args
25 defaultArgs = mconcat
26 [ cabalArgs
27 , ghcPkgArgs
28 , ghcMArgs
29 , gccMArgs
30 , ghcArgs
31 , gccArgs
32 , arArgs
33 , ldArgs
34 , ghcCabalHsColourArgs
35 , haddockArgs
36 , customPackageArgs ]