Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-generics
[ghc-hetmet.git] / mk / validate-settings.mk
1 # DO NOT EDIT!  Instead, create a file mk/validate.mk, whose settings will
2 # override these.  See also mk/custom-settings.mk.
3
4 WERROR          = -Werror
5
6 HADDOCK_DOCS    = YES
7 SRC_CC_OPTS     += -Wall $(WERROR)
8 SRC_HC_OPTS     += -Wall $(WERROR) -H64m -O0
9
10 GhcStage1HcOpts += -O
11
12 GhcStage2HcOpts += -O
13 # Using -O (rather than -O0) here bringes my validate down from 22mins to 16 mins.
14 # Compiling stage2 takes longer, but we gain a faster haddock, faster
15 # running of the tests, and faster building of the utils to be installed
16
17 GhcLibHcOpts    += -O -dcore-lint
18 GhcLibWays     := $(filter v dyn,$(GhcLibWays))
19 SplitObjs       = NO
20 NoFibWays       =
21 STRIP_CMD       = :
22
23 CHECK_PACKAGES = YES
24
25 # We want to install DPH when validating, so that we can test it
26 InstallExtraPackages = YES    
27
28 # dblatex with miktex under msys/mingw can't build the PS and PDF docs,
29 # and just building the HTML docs is sufficient to check that the
30 # markup is correct, so we turn off PS and PDF doc building when
31 # validating.
32 BUILD_DOCBOOK_PS  = NO
33 BUILD_DOCBOOK_PDF = NO
34
35 ifeq "$(ValidateHpc)" "YES"
36 GhcStage2HcOpts += -fhpc -hpcdir $(TOP)/testsuite/hpc_output/
37 endif
38 ifeq "$(ValidateSlow)" "YES"
39 GhcStage2HcOpts += -DDEBUG
40 endif
41
42 ######################################################################
43 # Disable some warnings in packages we use
44
45 # Temporarily turn off incomplete-pattern warnings for containers
46 libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-incomplete-patterns
47
48 # bytestring has identities at the moment
49 libraries/bytestring_dist-install_EXTRA_HC_OPTS += -fno-warn-identities
50
51 # Temporarily turn off unused-do-bind warnings for the time package
52 libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-do-bind
53 # On Windows, there are also some unused import warnings
54 libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports -fno-warn-identities
55
56 # haskeline has warnings about deprecated use of block/unblock
57 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
58 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
59
60 # Temporarily turn off unused-import warnings for the binary package
61 libraries/binary_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-imports
62 libraries/binary_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports -fno-warn-identities
63
64 # Temporarily turn off -Werror for some Hoopl modules that have
65 # non-exhaustive pattern-match warnings
66 libraries/hoopl/src/Compiler/Hoopl/Util_HC_OPTS += -Wwarn
67 libraries/hoopl/src/Compiler/Hoopl/GraphUtil_HC_OPTS += -Wwarn
68 libraries/hoopl/src/Compiler/Hoopl/MkGraph_HC_OPTS += -Wwarn
69 libraries/hoopl/src/Compiler/Hoopl/XUtil_HC_OPTS += -Wwarn
70 libraries/hoopl/src/Compiler/Hoopl/Pointed_HC_OPTS += -Wwarn
71 libraries/hoopl/src/Compiler/Hoopl/Passes/Dominator_HC_OPTS += -Wwarn
72
73 # primitive has a warning about deprecated use of GHC.IOBase
74 libraries/primitive_dist-install_EXTRA_HC_OPTS += -Wwarn
75
76 # vector has some unused match warnings
77 libraries/vector_dist-install_EXTRA_HC_OPTS += -Wwarn
78
79 libraries/dph/dph-base_dist-install_EXTRA_HC_OPTS += -Wwarn
80 libraries/dph/dph-prim-interface_dist-install_EXTRA_HC_OPTS += -Wwarn
81 libraries/dph/dph-prim-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
82 libraries/dph/dph-prim-par_dist-install_EXTRA_HC_OPTS += -Wwarn
83 libraries/dph/dph-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
84 libraries/dph/dph-par_dist-install_EXTRA_HC_OPTS += -Wwarn
85
86 # We need -fno-warn-deprecated-flags to avoid failure with -Werror
87 GhcLibHcOpts += -fno-warn-deprecated-flags
88 GhcBootLibHcOpts += -fno-warn-deprecated-flags
89