Fix warnings in deSugar/DsListComp.lhs
[ghc.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
8 SRC_CC_OPTS += -Wall $(WERROR)
9 # Debian doesn't turn -Werror=unused-but-set-variable on by default, so
10 # we turn it on explicitly for consistency with other users
11 ifeq "$(GccLT46)" "NO"
12 SRC_CC_OPTS += -Werror=unused-but-set-variable
13 # gcc 4.6 gives 3 warning for giveCapabilityToTask not being inlined
14 SRC_CC_OPTS += -Wno-error=inline
15 endif
16
17 SRC_HC_OPTS += -Wall $(WERROR) -H64m -O0
18
19 # Safe by default
20 #SRC_HC_OPTS += -Dsh_SAFE_DEFAULT
21
22 GhcStage1HcOpts += -O -fwarn-tabs
23
24 GhcStage2HcOpts += -O -fwarn-tabs
25 # Using -O (rather than -O0) here bringes my validate down from 22mins to 16 mins.
26 # Compiling stage2 takes longer, but we gain a faster haddock, faster
27 # running of the tests, and faster building of the utils to be installed
28
29 GhcLibHcOpts += -O -dcore-lint
30 GhcLibWays := $(filter v dyn,$(GhcLibWays))
31 SplitObjs = NO
32 NoFibWays =
33 STRIP_CMD = :
34
35 CHECK_PACKAGES = YES
36
37 # We want to install DPH when validating, so that we can test it
38 InstallExtraPackages = YES
39
40 # dblatex with miktex under msys/mingw can't build the PS and PDF docs,
41 # and just building the HTML docs is sufficient to check that the
42 # markup is correct, so we turn off PS and PDF doc building when
43 # validating.
44 BUILD_DOCBOOK_PS = NO
45 BUILD_DOCBOOK_PDF = NO
46
47 ifeq "$(ValidateHpc)" "YES"
48 GhcStage2HcOpts += -fhpc -hpcdir $(TOP)/testsuite/hpc_output/
49 endif
50 ifeq "$(ValidateSlow)" "YES"
51 GhcStage2HcOpts += -DDEBUG
52 endif
53
54 ######################################################################
55 # Disable some warnings in packages we use
56
57 # Cabal doesn't promise to be warning-free
58 utils/ghc-cabal_dist_EXTRA_HC_OPTS += -w
59 libraries/Cabal/Cabal_dist-boot_EXTRA_HC_OPTS += -w
60 libraries/Cabal/Cabal_dist-install_EXTRA_HC_OPTS += -w
61
62 # Temporarily turn off incomplete-pattern warnings for containers
63 libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-incomplete-patterns
64
65 # bytestring has identities at the moment
66 libraries/bytestring_dist-install_EXTRA_HC_OPTS += -fno-warn-identities
67
68 # Temporarily turn off unused-do-bind warnings for the time package
69 libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-do-bind
70 # Temporary: mkTyCon is deprecated
71 libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
72 # On Windows, there are also some unused import warnings
73 libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports -fno-warn-identities
74
75 # haskeline has warnings about deprecated use of block/unblock
76 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
77 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
78
79 # Temporarily turn off unused-import warnings for the binary package
80 libraries/binary_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-imports
81 libraries/binary_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports -fno-warn-identities
82
83 # Temporarily turn off -Werror for some Hoopl modules that have
84 # non-exhaustive pattern-match warnings
85 libraries/hoopl/src/Compiler/Hoopl/Util_HC_OPTS += -Wwarn
86 libraries/hoopl/src/Compiler/Hoopl/GraphUtil_HC_OPTS += -Wwarn
87 libraries/hoopl/src/Compiler/Hoopl/MkGraph_HC_OPTS += -Wwarn
88 libraries/hoopl/src/Compiler/Hoopl/XUtil_HC_OPTS += -Wwarn
89 libraries/hoopl/src/Compiler/Hoopl/Pointed_HC_OPTS += -Wwarn
90 libraries/hoopl/src/Compiler/Hoopl/Passes/Dominator_HC_OPTS += -Wwarn
91
92 # primitive has a warning about deprecated use of GHC.IOBase
93 libraries/primitive_dist-install_EXTRA_HC_OPTS += -Wwarn
94
95 # vector has some unused match warnings
96 libraries/vector_dist-install_EXTRA_HC_OPTS += -Wwarn
97
98 libraries/dph/dph-base_dist-install_EXTRA_HC_OPTS += -Wwarn
99 libraries/dph/dph-prim-interface_dist-install_EXTRA_HC_OPTS += -Wwarn
100 libraries/dph/dph-prim-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
101 libraries/dph/dph-prim-par_dist-install_EXTRA_HC_OPTS += -Wwarn
102 libraries/dph/dph-seq_dist-install_EXTRA_HC_OPTS += -Wwarn
103 libraries/dph/dph-par_dist-install_EXTRA_HC_OPTS += -Wwarn
104
105 # We need to turn of deprecated warnings for SafeHaskell transition
106 libraries/array_dist-install_EXTRA_HC_OPTS += -fno-warn-warnings-deprecations
107 libraries/binary_dist-install_EXTRA_HC_OPTS += -fno-warn-warnings-deprecations
108 libraries/binary/src/Data/Binary/Builder/Base_HC_OPTS += -fno-warn-warnings-deprecations
109 libraries/binary/src/Data/Binary/Get_HC_OPTS += -fno-warn-warnings-deprecations
110
111 # We need -fno-warn-deprecated-flags to avoid failure with -Werror
112 GhcLibHcOpts += -fno-warn-deprecated-flags
113 GhcBootLibHcOpts += -fno-warn-deprecated-flags
114