summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2014-09-23 08:44:02 -0500
committerAustin Seipp <austin@well-typed.com>2014-09-23 08:44:03 -0500
commit2a743bbddd4de41a77af9b83ec4720cd013292cf (patch)
tree71cbb04c5c50e50bde9ad30eb3eb50e70a0ed9ee /ghc
parent01906c7399301e4f69959ecbd3b0d8bee5d5ef70 (diff)
downloadhaskell-2a743bbddd4de41a77af9b83ec4720cd013292cf.tar.gz
Delete hack when takeDirectory returns ""
Summary: Since commits 8fe1f8 and bb6731 in the filepath packages (ticket #2034, closed in 2010), takeDirectory "foo" returns ".", and not "", so this check is no longer needed. Other commits: * Remove trailing whitespace * Update comments for #2278 Test Plan: harbormaster Reviewers: austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D213 GHC Trac Issues: #2034
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index e6ff043bf0..c1ee2478b5 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -345,16 +345,16 @@ checkOptions mode dflags srcs objs = do
-- Compiler output options
--- called to verify that the output files & directories
--- point somewhere valid.
+-- Called to verify that the output files point somewhere valid.
--
-- The assumption is that the directory portion of these output
-- options will have to exist by the time 'verifyOutputFiles'
-- is invoked.
--
+-- We create the directories for -odir, -hidir, -outputdir etc. ourselves if
+-- they don't exist, so don't check for those here (#2278).
verifyOutputFiles :: DynFlags -> IO ()
verifyOutputFiles dflags = do
- -- not -odir: we create the directory for -odir if it doesn't exist (#2278).
let ofile = outputFile dflags
when (isJust ofile) $ do
let fn = fromJust ofile