diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-11-11 10:49:40 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-11-11 12:49:49 +0000 |
commit | 58803d7288a1a49f79406bdb8b8d748c9fd32ea1 (patch) | |
tree | 7741ae1383757b3239e68ddbaa3f10efa4c30ed2 /compiler/iface/FlagChecker.hs | |
parent | 17f6f463844bbb7085b1bd9ab89436bfa93f8409 (diff) | |
download | haskell-58803d7288a1a49f79406bdb8b8d748c9fd32ea1.tar.gz |
Normalise FilePaths before hashing (fixes base01)
Diffstat (limited to 'compiler/iface/FlagChecker.hs')
-rw-r--r-- | compiler/iface/FlagChecker.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index ddc99cfe63..f670437ffe 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -12,8 +12,10 @@ import DynFlags import HscTypes import Name import Fingerprint +-- import Outputable import Data.List (sort) +import System.FilePath (normalise) -- | Produce a fingerprint of a @DynFlags@ value. We only base -- the finger print on important fields in @DynFlags@ so that @@ -32,12 +34,14 @@ fingerprintDynFlags DynFlags{..} nameio = sort $ map fromEnum $ extensionFlags) -- -I, -D and -U flags affect CPP - cpp = (includePaths, sOpt_P settings) + cpp = (map normalise includePaths, sOpt_P settings) + -- normalise: eliminate spurious differences due to "./foo" vs "foo" -- -i, -osuf, -hcsuf, -hisuf, -odir, -hidir, -stubdir, -o, -ohi - paths = (importPaths, + paths = (map normalise importPaths, [ objectSuf, hcSuf, hiSuf ], [ objectDir, hiDir, stubDir, outputFile, outputHi ]) - in computeFingerprint nameio (mainis, safeHs, lang, cpp, paths) + in -- pprTrace "flags" (ppr (mainis, safeHs, lang, cpp, paths)) $ + computeFingerprint nameio (mainis, safeHs, lang, cpp, paths) |