Skip to content

Commit

Permalink
Pass on -v0 to GHC.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
  • Loading branch information
ezyang committed Aug 6, 2016
1 parent 27b4aa8 commit e3fd8c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 8 additions & 6 deletions Cabal/Distribution/Simple/GHC/Internal.hs
Expand Up @@ -241,10 +241,11 @@ componentCcGhcOptions :: Verbosity -> GhcImplInfo -> LocalBuildInfo
-> BuildInfo -> ComponentLocalBuildInfo
-> FilePath -> FilePath
-> GhcOptions
componentCcGhcOptions _verbosity _implInfo lbi bi clbi odir filename =
componentCcGhcOptions verbosity _implInfo lbi bi clbi odir filename =
mempty {
-- Use --ghc-option=-v instead!
ghcOptVerbosity = NoFlag,
-- Respect -v0, but don't crank up verbosity on GHC if
-- Cabal verbosity is requested. For that, use --ghc-option=-v instead!
ghcOptVerbosity = toFlag (min verbosity normal),
ghcOptMode = toFlag GhcModeCompile,
ghcOptInputFiles = toNubListR [filename],

Expand All @@ -270,10 +271,11 @@ componentCcGhcOptions _verbosity _implInfo lbi bi clbi odir filename =
componentGhcOptions :: Verbosity -> LocalBuildInfo
-> BuildInfo -> ComponentLocalBuildInfo -> FilePath
-> GhcOptions
componentGhcOptions _verbosity lbi bi clbi odir =
componentGhcOptions verbosity lbi bi clbi odir =
mempty {
-- Use --ghc-option=-v instead!
ghcOptVerbosity = NoFlag,
-- Respect -v0, but don't crank up verbosity on GHC if
-- Cabal verbosity is requested. For that, use --ghc-option=-v instead!
ghcOptVerbosity = toFlag (min verbosity normal),
ghcOptHideAllPackages = toFlag True,
ghcOptCabal = toFlag True,
ghcOptThisUnitId = case clbi of
Expand Down
7 changes: 4 additions & 3 deletions cabal-install/Distribution/Client/SetupWrapper.hs
Expand Up @@ -91,7 +91,7 @@ import Distribution.Text
import Distribution.Utils.NubList
( toNubListR )
import Distribution.Verbosity
( Verbosity )
( Verbosity, normal )
import Distribution.Compat.Exception
( catchIO )

Expand Down Expand Up @@ -624,8 +624,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do
addRenaming (ipid, _) = (ipid, defaultRenaming)
cppMacrosFile = setupDir </> "setup_macros.h"
ghcOptions = mempty {
-- Use --ghc-option=-v instead!
ghcOptVerbosity = NoFlag
-- Respect -v0, but don't crank up verbosity on GHC if
-- Cabal verbosity is requested. For that, use --ghc-option=-v instead!
ghcOptVerbosity = Flag (min verbosity normal)
, ghcOptMode = Flag GhcModeMake
, ghcOptInputFiles = toNubListR [setupHs]
, ghcOptOutputFile = Flag setupProgFile
Expand Down

0 comments on commit e3fd8c8

Please sign in to comment.