[commit: ghc] master: Enable -Wcpp-undef for GHC and runtime system (6267d8c)

git at git.haskell.org git at git.haskell.org
Sat Aug 19 03:28:42 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6267d8c9e54663a23f0ac13556522a53580d0910/ghc

>---------------------------------------------------------------

commit 6267d8c9e54663a23f0ac13556522a53580d0910
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Aug 18 08:37:14 2017 -0400

    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


>---------------------------------------------------------------

6267d8c9e54663a23f0ac13556522a53580d0910
 mk/warnings.mk | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/mk/warnings.mk b/mk/warnings.mk
index 16d13a2..85cb1a0 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"
 



More information about the ghc-commits mailing list