summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-06-14 12:28:34 +0000
committerIan Lynagh <igloo@earth.li>2008-06-14 12:28:34 +0000
commit06c159151e9cdecbe0602700a88147d2d1e4e225 (patch)
tree4a0f637b655992a3febc5b6e51b8e877ba564354
parent2b6e4da63cfb4aba7b0d8ac13f4baee2e6ed38bf (diff)
downloadhaskell-06c159151e9cdecbe0602700a88147d2d1e4e225.tar.gz
Make initSysTools use the dflags it is passed, rather than defaultDynFlags
-rw-r--r--compiler/main/GHC.hs4
-rw-r--r--compiler/main/SysTools.lhs4
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