[commit: haddock] master: Drop needless --split-objs which slows us down. (725faca)

git at git.haskell.org git at git.haskell.org
Sat Mar 22 16:39:54 UTC 2014


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/725faca5ee670f80359321adc112408880e9c073

>---------------------------------------------------------------

commit 725faca5ee670f80359321adc112408880e9c073
Author: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
Date:   Sat Mar 22 16:36:16 2014 +0000

    Drop needless --split-objs which slows us down.
    
    Involves tiny cleanup of all the dynflag bindings. Fixes #292.


>---------------------------------------------------------------

725faca5ee670f80359321adc112408880e9c073
 src/Haddock.hs |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/Haddock.hs b/src/Haddock.hs
index 6d975c9..78844c9 100644
--- a/src/Haddock.hs
+++ b/src/Haddock.hs
@@ -317,19 +317,18 @@ readInterfaceFiles name_cache_accessor pairs = do
 withGhc :: String -> [String] -> (DynFlags -> Ghc a) -> IO a
 withGhc libDir flags ghcActs = runGhc (Just libDir) $ do
   dynflags  <- getSessionDynFlags
-  let dynflags' = gopt_set dynflags Opt_Haddock
-  let dynflags'' = dynflags' {
-      hscTarget = HscNothing,
-      ghcMode   = CompManager,
-      ghcLink   = NoLink
+  dynflags' <- parseGhcFlags (gopt_set dynflags Opt_Haddock) {
+    hscTarget = HscNothing,
+    ghcMode   = CompManager,
+    ghcLink   = NoLink
     }
-  dynflags''' <- parseGhcFlags dynflags''
-  defaultCleanupHandler dynflags''' $ do
+  let dynflags'' = gopt_unset dynflags' Opt_SplitObjs
+  defaultCleanupHandler dynflags'' $ do
       -- ignore the following return-value, which is a list of packages
       -- that may need to be re-linked: Haddock doesn't do any
       -- dynamic or static linking at all!
-      _ <- setSessionDynFlags dynflags'''
-      ghcActs dynflags'''
+      _ <- setSessionDynFlags dynflags''
+      ghcActs dynflags''
   where
     parseGhcFlags :: MonadIO m => DynFlags -> m DynFlags
     parseGhcFlags dynflags = do



More information about the ghc-commits mailing list