[commit: ghc] wip/nfs-locking: Reduce verbosity of ghc-cabal and ghc-pkg (d3d00b0)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:23:53 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/d3d00b0c412d964891f63fbd6c52bc457d6b3233/ghc

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

commit d3d00b0c412d964891f63fbd6c52bc457d6b3233
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Oct 5 17:36:54 2016 +0100

    Reduce verbosity of ghc-cabal and ghc-pkg


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

d3d00b0c412d964891f63fbd6c52bc457d6b3233
 src/Settings/Builders/GhcCabal.hs | 37 ++++++++++++++++++++-----------------
 src/Settings/Builders/GhcPkg.hs   |  2 ++
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/src/Settings/Builders/GhcCabal.hs b/src/Settings/Builders/GhcCabal.hs
index 14c1254..fffb2c0 100644
--- a/src/Settings/Builders/GhcCabal.hs
+++ b/src/Settings/Builders/GhcCabal.hs
@@ -17,23 +17,26 @@ import Settings.Builders.Common
 import Settings.Paths
 
 ghcCabalBuilderArgs :: Args
-ghcCabalBuilderArgs = builder GhcCabal ? mconcat
-    [ arg "configure"
-    , arg =<< getPackagePath
-    , arg =<< getContextDirectory
-    , dll0Args
-    , withStaged $ Ghc CompileHs
-    , withStaged GhcPkg
-    , bootPackageDatabaseArgs
-    , libraryArgs
-    , with HsColour
-    , configureArgs
-    , packageConstraints
-    , withStaged $ Cc CompileC
-    , notStage0 ? with Ld
-    , with Ar
-    , with Alex
-    , with Happy ]
+ghcCabalBuilderArgs = builder GhcCabal ? do
+    verbosity <- lift $ getVerbosity
+    mconcat [ arg "configure"
+            , arg =<< getPackagePath
+            , arg =<< getContextDirectory
+            , dll0Args
+            , withStaged $ Ghc CompileHs
+            , withStaged GhcPkg
+            , bootPackageDatabaseArgs
+            , libraryArgs
+            , with HsColour
+            , configureArgs
+            , packageConstraints
+            , withStaged $ Cc CompileC
+            , notStage0 ? with Ld
+            , with Ar
+            , with Alex
+            , with Happy
+            , verbosity < Chatty ? append [ "-v0", "--configure-option=--quiet"
+                , "--configure-option=--disable-option-checking"  ] ]
 
 ghcCabalHsColourBuilderArgs :: Args
 ghcCabalHsColourBuilderArgs = builder GhcCabalHsColour ? do
diff --git a/src/Settings/Builders/GhcPkg.hs b/src/Settings/Builders/GhcPkg.hs
index ed6843a..b221b9d 100644
--- a/src/Settings/Builders/GhcPkg.hs
+++ b/src/Settings/Builders/GhcPkg.hs
@@ -20,7 +20,9 @@ updateArgs :: Args
 updateArgs = notM initPredicate ? do
     pkg <- getPackage
     dir <- getContextDirectory
+    verbosity <- lift $ getVerbosity
     mconcat [ arg "update"
             , arg "--force"
+            , verbosity < Chatty ? arg "-v0"
             , bootPackageDatabaseArgs
             , arg $ pkgPath pkg -/- dir -/- "inplace-pkg-config" ]



More information about the ghc-commits mailing list