diff options
author | Ian Lynagh <igloo@earth.li> | 2008-06-14 12:28:34 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-06-14 12:28:34 +0000 |
commit | 06c159151e9cdecbe0602700a88147d2d1e4e225 (patch) | |
tree | 4a0f637b655992a3febc5b6e51b8e877ba564354 | |
parent | 2b6e4da63cfb4aba7b0d8ac13f4baee2e6ed38bf (diff) | |
download | haskell-06c159151e9cdecbe0602700a88147d2d1e4e225.tar.gz |
Make initSysTools use the dflags it is passed, rather than defaultDynFlags
-rw-r--r-- | compiler/main/GHC.hs | 4 | ||||
-rw-r--r-- | compiler/main/SysTools.lhs | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 7d3ef501e6..bf3bfd1eb4 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -351,8 +351,8 @@ newSession mb_top_dir = do installSignalHandlers initStaticOpts - dflags0 <- initSysTools mb_top_dir defaultDynFlags - dflags <- initDynFlags dflags0 + dflags0 <- initDynFlags defaultDynFlags + dflags <- initSysTools mb_top_dir dflags0 env <- newHscEnv dflags ref <- newIORef env return (Session ref) diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 96833c8651..12fc36e96a 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -149,7 +149,7 @@ initSysTools :: Maybe String -- Maybe TopDir path (without the '-B' prefix) -- (c) the GHC usage message -initSysTools mbMinusB _ +initSysTools mbMinusB dflags0 = do { (am_installed, top_dir) <- findTopDir mbMinusB -- top_dir -- for "installed" this is the root of GHC's support files @@ -193,8 +193,6 @@ initSysTools mbMinusB _ | am_installed = installed_bin "bin/windres" | otherwise = "windres" - ; let dflags0 = defaultDynFlags - ; tmpdir <- getTemporaryDirectory ; let dflags1 = setTmpDir tmpdir dflags0 |