From 06c159151e9cdecbe0602700a88147d2d1e4e225 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 14 Jun 2008 12:28:34 +0000 Subject: [PATCH] Make initSysTools use the dflags it is passed, rather than defaultDynFlags --- compiler/main/GHC.hs | 4 ++-- 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 7d3ef50..bf3bfd1 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 96833c8..12fc36e 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 -- 1.7.10.4