[commit: ghc] wip/nfs-locking: Split Ar arguments into chunks of length 100 at most. (821776b)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:51:15 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/821776b91341b4651f30f56ec08069a17c0d0a2b/ghc
>---------------------------------------------------------------
commit 821776b91341b4651f30f56ec08069a17c0d0a2b
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Tue Jan 13 06:33:44 2015 +0000
Split Ar arguments into chunks of length 100 at most.
>---------------------------------------------------------------
821776b91341b4651f30f56ec08069a17c0d0a2b
src/Package/Library.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Package/Library.hs b/src/Package/Library.hs
index 9f200e4..ec2b845 100644
--- a/src/Package/Library.hs
+++ b/src/Package/Library.hs
@@ -2,6 +2,7 @@
module Package.Library (buildPackageLibrary) where
import Package.Base
+import Data.List.Split
arRule :: Package -> TodoItem -> Rules ()
arRule (Package _ path _) (stage, dist, _) =
@@ -15,7 +16,8 @@ arRule (Package _ path _) (stage, dist, _) =
need depObjs
libObjs <- pkgLibObjects path dist stage way
liftIO $ removeFiles "." [out]
- terseRun Ar $ "q" <+> toStandard out <+> libObjs
+ forM_ (chunksOf 100 libObjs) $ \os -> do
+ terseRun Ar $ "q" <+> toStandard out <+> os
ldRule :: Package -> TodoItem -> Rules ()
ldRule (Package name path _) (stage, dist, _) =
More information about the ghc-commits
mailing list