Commit 46d392ad authored by md9ms's avatar md9ms
Browse files

Create pkgConf if it doesn't exist

parent 799b8fcf
......@@ -58,8 +58,9 @@ import Distribution.Simple.Utils (rawSystemExit, setupMessage,
import Control.Monad (when)
import Control.Monad (when, unless)
import Data.List(intersperse)
import System.Directory (doesFileExist)
import System.Environment (getEnv)
import qualified Distribution.Simple.GHCPackageConfig as GHC (localPackageConfig)
......@@ -102,6 +103,8 @@ buildGHC pref pkg_descr lbi = do
-- first, build the modules
pkgConf <- GHC.localPackageConfig
pkgConfExists <- doesFileExist pkgConf
unless pkgConfExists $ writeFile pkgConf "[]\n"
let args = ["-package-conf", pkgConf]
++ constructGHCCmdLine pref pkg_descr lbi
rawSystemExit (compilerPath (compiler lbi)) args
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