[commit: ghc] wip/nfs-locking: Remove duplicates from library archives. (3cd6a3b)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:23:05 UTC 2017


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

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

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

commit 3cd6a3b7e70f658db663251037a6f034e3ab89f0
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Mon Dec 7 01:43:51 2015 +0000

    Remove duplicates from library archives.


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

3cd6a3b7e70f658db663251037a6f034e3ab89f0
 src/Rules/Library.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Rules/Library.hs b/src/Rules/Library.hs
index b1c3f3c..d51e2ad 100644
--- a/src/Rules/Library.hs
+++ b/src/Rules/Library.hs
@@ -1,4 +1,4 @@
-module Rules.Library (buildPackageLibrary) where
+module Rules.Library (buildPackageLibrary, cSources, hSources) where
 
 import Expression hiding (splitPath)
 import Oracles
@@ -19,7 +19,7 @@ buildPackageLibrary _ target @ (PartialTarget stage pkg) = do
         cSrcs <- cSources target
         hSrcs <- hSources target
 
-        let way   = detectWay a
+        let way   = detectWay a -- TODO: eliminate differences below
             cObjs = [ buildPath -/- src -<.> osuf way | src <- cSrcs ]
             hObjs = [ buildPath -/- src  <.> osuf way | src <- hSrcs ]
 
@@ -28,14 +28,14 @@ buildPackageLibrary _ target @ (PartialTarget stage pkg) = do
         need $ cObjs ++ hObjs
 
         split <- interpretPartial target splitObjects
-        splitObjs <- if not split then return [] else
+        splitObjs <- if not split then return hObjs else -- TODO: make clearer!
             fmap concat $ forM hSrcs $ \src -> do
                 let splitPath = buildPath -/- src ++ "_" ++ osuf way ++ "_split"
                 contents <- liftIO $ IO.getDirectoryContents splitPath
                 return . map (splitPath -/-)
                        . filter (not . all (== '.')) $ contents
 
-        build $ fullTarget target Ar (cObjs ++ hObjs ++ splitObjs) [a]
+        build $ fullTarget target Ar (cObjs ++ splitObjs) [a]
 
         synopsis <- interpretPartial target $ getPkgData Synopsis
         putSuccess $ "/--------\n| Successfully built package library '"



More information about the ghc-commits mailing list