summaryrefslogtreecommitdiff
path: root/compiler/iface/FlagChecker.hs
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2017-03-25 10:53:29 -0400
committerBen Gamari <ben@smart-cactus.org>2017-03-26 19:28:29 -0400
commit14b46a556dde8a2795ff5ede46ba8ee63368ae93 (patch)
tree626fa3b751ffc03c649bc15cc60871c09016800a /compiler/iface/FlagChecker.hs
parent43e7b23a472e5decc3fde2fcaf924e0c893b8a64 (diff)
downloadhaskell-14b46a556dde8a2795ff5ede46ba8ee63368ae93.tar.gz
Recompile if -fhpc is added or removed (#11798)
Test Plan: validate Reviewers: austin, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3368
Diffstat (limited to 'compiler/iface/FlagChecker.hs')
-rw-r--r--compiler/iface/FlagChecker.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs
index b21c2ce591..2c0b6c4367 100644
--- a/compiler/iface/FlagChecker.hs
+++ b/compiler/iface/FlagChecker.hs
@@ -57,9 +57,15 @@ fingerprintDynFlags dflags@DynFlags{..} this_mod nameio =
then 0
else optLevel
- in -- pprTrace "flags" (ppr (mainis, safeHs, lang, cpp, paths, prof, opt)) $
- computeFingerprint nameio (mainis, safeHs, lang, cpp, paths, prof, opt)
+ -- -fhpc, see https://ghc.haskell.org/trac/ghc/ticket/11798
+ -- hpcDir is output-only, so we should recompile if it changes
+ hpc = if gopt Opt_Hpc dflags then Just hpcDir else Nothing
+ -- Nesting just to avoid ever more Binary tuple instances
+ flags = (mainis, safeHs, lang, cpp, paths, (prof, opt, hpc))
+
+ in -- pprTrace "flags" (ppr flags) $
+ computeFingerprint nameio flags
{- Note [path flags and recompilation]