[commit: ghc] wip/nfs-locking: Need rts at the top-level to allow more parallelism (adc8e35)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:59:41 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/adc8e3531a5e301b4c00eaf4372c8a3b8a0205cc/ghc

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

commit adc8e3531a5e301b4c00eaf4372c8a3b8a0205cc
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Sep 14 18:23:47 2017 +0100

    Need rts at the top-level to allow more parallelism
    
    See #393


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

adc8e3531a5e301b4c00eaf4372c8a3b8a0205cc
 src/Rules.hs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Rules.hs b/src/Rules.hs
index fcf3f65..ea3df45 100644
--- a/src/Rules.hs
+++ b/src/Rules.hs
@@ -32,7 +32,7 @@ allStages = [minBound ..]
 -- 'Stage1Only' flag.
 topLevelTargets :: Rules ()
 topLevelTargets = action $ do
-    let libraryPackages = filter isLibrary (knownPackages \\ [rts, libffi])
+    let libraryPackages = filter isLibrary (knownPackages \\ [libffi])
     need =<< if stage1Only
              then do
                  libs <- concatForM [Stage0, Stage1] $ \stage ->
@@ -41,11 +41,10 @@ topLevelTargets = action $ do
                  return $ libs ++ prgs ++ inplaceLibCopyTargets
              else do
                  targets <- concatForM allStages $ \stage ->
-                     concatForM (knownPackages \\ [rts, libffi]) $
+                     concatForM (knownPackages \\ [libffi]) $
                         packageTargets False stage
                  return $ targets ++ inplaceLibCopyTargets
 
-
 -- TODO: Get rid of the @includeGhciLib@ hack.
 -- | Return the list of targets associated with a given 'Stage' and 'Package'.
 -- By setting the Boolean parameter to False it is possible to exclude the GHCi
@@ -62,14 +61,15 @@ packageTargets includeGhciLib stage pkg = do
     then return [] -- Skip inactive packages.
     else if isLibrary pkg
         then do -- Collect all targets of a library package.
-            ways    <- interpretInContext context getLibraryWays
+            let pkgWays = if pkg == rts then getRtsWays else getLibraryWays
+            ways    <- interpretInContext context pkgWays
             libs    <- mapM (pkgLibraryFile . Context stage pkg) ways
             docs    <- interpretInContext context =<< buildHaddock <$> flavour
             more    <- libraryTargets includeGhciLib context
             setup   <- pkgSetupConfigFile context
             haddock <- pkgHaddockFile     context
-            return $ [ setup   | nonCabalContext context ]
-                  ++ [ haddock | docs && stage == Stage1 ]
+            return $ [ setup   | not $ nonCabalContext context ]
+                  ++ [ haddock | pkg /= rts && docs && stage == Stage1 ]
                   ++ libs ++ more
         else do -- The only target of a program package is the executable.
             prgContext <- programContext stage pkg



More information about the ghc-commits mailing list