summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorAdam Sandberg Ericsson <adam@sandbergericsson.se>2020-07-04 17:44:46 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-07 13:56:07 -0400
commit4d24f886a428e95eb5e962294c77b12bffa40a52 (patch)
tree4ec8ef2277f33236a4a89eea08c2a24f81d8d4cc /hadrian
parent9615343363a68313c4bfdb068696002ecca7786e (diff)
downloadhaskell-4d24f886a428e95eb5e962294c77b12bffa40a52.tar.gz
hadrian: ignore cabal configure verbosity related flags #18131
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Settings/Builders/Cabal.hs1
-rw-r--r--hadrian/src/Target.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/Cabal.hs b/hadrian/src/Settings/Builders/Cabal.hs
index 85350d96e6..19c3c7e850 100644
--- a/hadrian/src/Settings/Builders/Cabal.hs
+++ b/hadrian/src/Settings/Builders/Cabal.hs
@@ -60,6 +60,7 @@ cabalBuilderArgs = builder (Cabal Setup) ? do
, withStaged (Ar Pack)
, with Alex
, with Happy
+ -- Update Target.trackArgument if changing these:
, verbosity < Chatty ?
pure [ "-v0", "--configure-option=--quiet"
, "--configure-option=--disable-option-checking" ] ]
diff --git a/hadrian/src/Target.hs b/hadrian/src/Target.hs
index f3de9036cd..2fb12f8c7c 100644
--- a/hadrian/src/Target.hs
+++ b/hadrian/src/Target.hs
@@ -22,7 +22,10 @@ trackArgument :: Target -> String -> Bool
trackArgument target arg = case builder target of
Make _ -> not $ threadArg arg
Ghc _ _ -> not $ verbosityArg arg
+ Cabal _ _ -> not $ verbosityArg arg || cabal_configure_ignore arg
_ -> True
where
threadArg s = dropWhileEnd isDigit s `elem` ["-j", "MAKEFLAGS=-j", "THREADS="]
verbosityArg s = dropWhileEnd isDigit s == "-v"
+ cabal_configure_ignore s =
+ s `elem` [ "--configure-option=--quiet", "--configure-option=--disable-option-checking" ]