Commit ed1173a7 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #2278: don't complain if the -odir directory doesn't exist

we'll create it anyway
parent 648718b0
......@@ -46,7 +46,6 @@ import Panic
-- Standard Haskell libraries
import Control.Exception ( throwDyn )
import System.IO
import System.Directory ( doesDirectoryExist )
import System.Environment
import System.Exit
import System.FilePath
......@@ -285,11 +284,7 @@ checkOptions cli_mode dflags srcs objs = do
--
verifyOutputFiles :: DynFlags -> IO ()
verifyOutputFiles dflags = do
let odir = objectDir dflags
when (isJust odir) $ do
let dir = fromJust odir
flg <- doesDirectoryExist dir
when (not flg) (nonExistentDir "-odir" dir)
-- 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment