summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-24 21:28:22 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-05-28 16:26:34 -0400
commit8f021b8c474f328441982c90c6a12f716b5607eb (patch)
tree23b4f3c2d1a97190a18917dfb33aed2d0018ef32 /hadrian
parentaef95f11f946f7d3f2c4c9b695d632cbfc4a993d (diff)
downloadhaskell-8f021b8c474f328441982c90c6a12f716b5607eb.tar.gz
hadrian: Don't track GHC's verbosity argument
Teach hadrian to ignore GHC's -v argument in its recompilation check, thus fixing #18131.
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Target.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/hadrian/src/Target.hs b/hadrian/src/Target.hs
index 30c8d98d14..f3de9036cd 100644
--- a/hadrian/src/Target.hs
+++ b/hadrian/src/Target.hs
@@ -20,7 +20,9 @@ type Target = H.Target Context Builder
-- 'True' only if the argument needs to be tracked.
trackArgument :: Target -> String -> Bool
trackArgument target arg = case builder target of
- (Make _) -> not $ threadArg arg
- _ -> True
+ Make _ -> not $ threadArg arg
+ Ghc _ _ -> not $ verbosityArg arg
+ _ -> True
where
threadArg s = dropWhileEnd isDigit s `elem` ["-j", "MAKEFLAGS=-j", "THREADS="]
+ verbosityArg s = dropWhileEnd isDigit s == "-v"