diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-07-19 16:52:06 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-19 19:38:59 -0400 |
commit | 58b960d2af0ebfc37104ec68a4df377a074951dd (patch) | |
tree | f0fc5bf672f76ec4f032a07d8d292fb1a6eaddb1 /compiler/GHC/Driver/Main.hs | |
parent | 535123e4f6505a148ccaa536c21282a87c42669c (diff) | |
download | haskell-58b960d2af0ebfc37104ec68a4df377a074951dd.tar.gz |
Make TmpFs independent of DynFlags
This is small step towards #19877. We want to make the Loader/Linker
interface more abstract to be easily reused (i.e. don't pass it
DynFlags) but the system linker uses TmpFs which required a DynFlags
value to get its temp directory. We explicitly pass the temp directory
now. Similarly TmpFs was consulting the DynFlags to decide whether to
clean or: this is now done by the caller in the driver code.
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index cb3c82ebd1..523d39e3db 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -437,7 +437,8 @@ hscParse' mod_summary -- - filter out the .hs/.lhs source filename if we have one -- let n_hspp = FilePath.normalise src_filename - srcs0 = nub $ filter (not . (tmpDir dflags `isPrefixOf`)) + TempDir tmp_dir = tmpDir dflags + srcs0 = nub $ filter (not . (tmp_dir `isPrefixOf`)) $ filter (not . (== n_hspp)) $ map FilePath.normalise $ filter (not . isPrefixOf "<") |