summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-07 15:11:37 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-07 15:24:28 +0000
commitc4fb520e3be8dc47f3053458412172502c5fcd2c (patch)
tree934ee93ea58cd3507bc6778ab1ae2b7253fb2db6
parent021a0dd265ff34c1e292813c06185eff1d6b5c1c (diff)
downloadhaskell-c4fb520e3be8dc47f3053458412172502c5fcd2c.tar.gz
Take into account -fprof-auto-*
-rw-r--r--compiler/iface/FlagChecker.hs6
-rw-r--r--compiler/main/DynFlags.hs1
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs
index 0ea1f3b0fc..611228e567 100644
--- a/compiler/iface/FlagChecker.hs
+++ b/compiler/iface/FlagChecker.hs
@@ -13,6 +13,7 @@ import HscTypes
import Name
import Fingerprint
-- import Outputable
+import StaticFlags
import qualified Data.IntSet as IntSet
import System.FilePath (normalise)
@@ -42,6 +43,9 @@ fingerprintDynFlags DynFlags{..} nameio =
[ objectSuf, hcSuf, hiSuf ],
[ objectDir, hiDir, stubDir, outputFile, outputHi ])
+ -- -fprof-auto etc.
+ prof = if opt_SccProfilingOn then fromEnum profAuto else 0
+
in -- pprTrace "flags" (ppr (mainis, safeHs, lang, cpp, paths)) $
- computeFingerprint nameio (mainis, safeHs, lang, cpp, paths)
+ computeFingerprint nameio (mainis, safeHs, lang, cpp, paths, prof)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 947b320e97..3cab4423c8 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -590,6 +590,7 @@ data ProfAuto
| ProfAutoTop -- ^ top-level functions annotated only
| ProfAutoExports -- ^ exported functions annotated only
| ProfAutoCalls -- ^ annotate call-sites
+ deriving (Enum)
data Settings = Settings {
sTargetPlatform :: Platform, -- Filled in by SysTools