aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-03-22 16:36:16 +0000
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-03-22 16:36:16 +0000
commit725faca5ee670f80359321adc112408880e9c073 (patch)
tree12ec19702bf56a1a2daff7ad89d76ce74ad14f95
parent77af42d7c5752214b1d5a762f3fec77910d583aa (diff)
Drop needless --split-objs which slows us down.
Involves tiny cleanup of all the dynflag bindings. Fixes #292.
-rw-r--r--src/Haddock.hs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Haddock.hs b/src/Haddock.hs
index 6d975c9b..78844c96 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