[commit: ghc] master: Drop -Werror (#487) (86216e2)

git at git.haskell.org git at git.haskell.org
Tue Oct 23 20:12:38 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/86216e249f307a778bef3755afb7474910bc60cc/ghc

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

commit 86216e249f307a778bef3755afb7474910bc60cc
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Dec 5 23:40:06 2017 +0000

    Drop -Werror (#487)
    
    * Drop -Werror from default arguments
    
    See #483, #485.


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

86216e249f307a778bef3755afb7474910bc60cc
 src/Settings/Builders/Cc.hs     |  2 +-
 src/Settings/Builders/Common.hs | 10 +++++-----
 src/Settings/Packages/Rts.hs    |  2 +-
 src/Settings/Warnings.hs        |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Settings/Builders/Cc.hs b/src/Settings/Builders/Cc.hs
index 70d043f..fdd9fc5 100644
--- a/src/Settings/Builders/Cc.hs
+++ b/src/Settings/Builders/Cc.hs
@@ -11,7 +11,7 @@ ccBuilderArgs = do
         , cIncludeArgs
 
         , builder (Cc CompileC) ? mconcat
-            [ pure ["-Wall", "-Werror"]
+            [ arg "-Wall"
             , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ]
             , arg "-c", arg =<< getInput
             , arg "-o", arg =<< getOutput ]
diff --git a/src/Settings/Builders/Common.hs b/src/Settings/Builders/Common.hs
index 340239a..bfcddeb 100644
--- a/src/Settings/Builders/Common.hs
+++ b/src/Settings/Builders/Common.hs
@@ -40,11 +40,11 @@ cArgs = mempty
 
 -- TODO: should be in a different file
 cWarnings :: Args
-cWarnings =
-    mconcat [ arg "-Wall"
-            , flag GccIsClang ? arg "-Wno-unknown-pragmas"
-            , notM (flag GccIsClang) ? notM windowsHost ? arg "-Werror=unused-but-set-variable"
-            , notM (flag GccIsClang) ? arg "-Wno-error=inline" ]
+cWarnings = mconcat
+    [ arg "-Wall"
+    , flag GccIsClang ? arg "-Wno-unknown-pragmas"
+    , notM (flag GccIsClang) ? notM windowsHost ? arg "-Werror=unused-but-set-variable"
+    , notM (flag GccIsClang) ? arg "-Wno-error=inline" ]
 
 bootPackageDatabaseArgs :: Args
 bootPackageDatabaseArgs = do
diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs
index cdc89da..7b3bb2d 100644
--- a/src/Settings/Packages/Rts.hs
+++ b/src/Settings/Packages/Rts.hs
@@ -209,7 +209,7 @@ rtsPackageArgs = package rts ? do
 -- See @rts/ghc.mk at .
 rtsWarnings :: Args
 rtsWarnings = mconcat
-    [ pure ["-Wall", "-Werror"]
+    [ arg "-Wall"
     , arg "-Wextra"
     , arg "-Wstrict-prototypes"
     , arg "-Wmissing-prototypes"
diff --git a/src/Settings/Warnings.hs b/src/Settings/Warnings.hs
index abbc814..19a12df 100644
--- a/src/Settings/Warnings.hs
+++ b/src/Settings/Warnings.hs
@@ -10,7 +10,7 @@ import Settings
 -- | Default Haskell warning-related arguments.
 defaultGhcWarningsArgs :: Args
 defaultGhcWarningsArgs = mconcat
-    [ notStage0 ? pure [ "-Werror", "-Wnoncanonical-monad-instances" ]
+    [ notStage0 ? arg "-Wnoncanonical-monad-instances"
     , (not <$> flag GccIsClang) ? mconcat
       [ (not <$> windowsHost ) ? arg "-optc-Werror=unused-but-set-variable"
       , arg "-optc-Wno-error=inline" ]



More information about the ghc-commits mailing list