summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-08-18 08:37:14 -0400
committerBen Gamari <ben@smart-cactus.org>2017-08-18 23:28:16 -0400
commit6267d8c9e54663a23f0ac13556522a53580d0910 (patch)
tree40dbb3392d95eb1491228369f47c5fa5c6d73c8a /mk
parentf50e30e0e34487ae8bf49653875ed7c8d0afa791 (diff)
downloadhaskell-6267d8c9e54663a23f0ac13556522a53580d0910.tar.gz
Enable -Wcpp-undef for GHC and runtime system
This gets us much of the benefit of enabling it globally, which avoiding (at least for now) the pain of making the core libraries build as well. See #13636. Test Plan: Validate Reviewers: erikd, austin Subscribers: rwbarton, thomie GHC Trac Issues: #13636 Differential Revision: https://phabricator.haskell.org/D3517
Diffstat (limited to 'mk')
-rw-r--r--mk/warnings.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/warnings.mk b/mk/warnings.mk
index 16d13a28ba..85cb1a0283 100644
--- a/mk/warnings.mk
+++ b/mk/warnings.mk
@@ -8,9 +8,14 @@ SRC_HC_OPTS += -Wall
# isn't supported yet (https://ghc.haskell.org/trac/ghc/wiki/Design/Warnings).
#
# See Note [Stage number in build variables] in mk/config.mk.in.
-SRC_HC_OPTS_STAGE1 += $(WERROR) #-Wcpp-undef
-SRC_HC_OPTS_STAGE2 += $(WERROR) #-Wcpp-undef
-
+SRC_HC_OPTS_STAGE1 += $(WERROR)
+SRC_HC_OPTS_STAGE2 += $(WERROR)
+
+# Enable -Wcpp-undef for GHC components only as we don't (currently) expect core
+# libraries to build in this configuration (see #13636).
+GhcRtsHcOpts += -Wcpp-undef
+GhcStage1HcOpts += -Wcpp-undef
+GhcStage2HcOpts += -Wcpp-undef
ifneq "$(GccIsClang)" "YES"