Commit 987d5427 authored by thomie's avatar thomie Committed by Austin Seipp

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
2c24fd70, when moving validate settings
from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D1425
parent 334fe450
......@@ -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)
......
......@@ -78,7 +78,6 @@ import Data.Monoid (All (..), Any (..), Dual (..), Endo (..),
Product (..), Sum (..))
import Data.Monoid (Alt (..))
import qualified Data.Monoid as Monoid
import Data.Proxy
import Data.Void
import GHC.Generics
......
......@@ -704,7 +704,7 @@ the special case varies more from the general case, due to the issue of overflow
{-# NOINLINE [0] enumDeltaIntegerFB #-}
enumDeltaIntegerFB :: (Integer -> b -> b) -> Integer -> Integer -> b
enumDeltaIntegerFB c x d = go x
enumDeltaIntegerFB c x0 d = go x0
where go x = x `seq` (x `c` go (x+d))
{-# NOINLINE [1] enumDeltaInteger #-}
......
......@@ -21,7 +21,7 @@ module GHC.GHCi {-# WARNING "This is an unstable interface." #-} (
GHCiSandboxIO(..), NoIO()
) where
import GHC.Base (IO(), Monad, Functor(fmap), Applicative(..), (>>=), return, id, (.), ap)
import GHC.Base (IO(), Monad, Functor(fmap), Applicative(..), (>>=), id, (.), ap)
-- | A monad that can execute GHCi statements by lifting them out of
-- m into the IO monad. (e.g state monads)
......
......@@ -25,9 +25,6 @@ SRC_CC_WARNING_OPTS += -Wno-unknown-pragmas
endif
SRC_CC_OPTS += -Wall
SRC_HC_OPTS += -Wall
GhcStage1HcOpts += -fwarn-tabs
GhcStage2HcOpts += -fwarn-tabs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment