summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-11-03 16:17:35 -0600
committerAustin Seipp <austin@well-typed.com>2015-11-03 16:17:42 -0600
commit987d542749be3b53d8461fa5abb770f0b9d8ba5e (patch)
tree8d389b3a8d3f7f715ca95c1d532dab82d897a0ae /ghc.mk
parent334fe4500c234e83f250f74679f7bbe20208abba (diff)
downloadhaskell-987d542749be3b53d8461fa5abb770f0b9d8ba5e.tar.gz
Build system: renable -Wall on validate (base)
Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'. It didn't affect the compiler or most other libraries, because most .cabal files define 'ghc-options: -Wall'. Bug introduced in commit 2c24fd707f8650205bb574ffac5f376239af3723, when moving validate settings from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1425
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index 07e1edcec2..aaf7d003dd 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -142,6 +142,14 @@ include mk/warnings.mk
# (Optional) build-specific configuration
include mk/custom-settings.mk
+SRC_CC_OPTS += -Wall
+SRC_HC_OPTS += -Wall
+# Don't add -Werror to GhcStage1HcOpts, because otherwise validate may
+# unnecessarily fail during the stage1 build when booting with an older
+# compiler.
+# It would be better to only exclude certain warnings from becoming errors
+# (e.g. '-Werror -Wno-error=unused-imports -Wno-error=...'), but -Wno-error
+# isn't supported yet (https://ghc.haskell.org/trac/ghc/wiki/Design/Warnings).
SRC_CC_OPTS += $(WERROR)
GhcStage2HcOpts += $(WERROR)
GhcLibHcOpts += $(WERROR)