[commit: ghc] wip/nfs-locking: Fix a poor pattern for detecting -0 library files. (b0424dc)

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


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

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

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

commit b0424dc9bb4c9035c1239d9d14bc720d4b6db9ad
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Dec 11 00:23:25 2015 +0000

    Fix a poor pattern for detecting -0 library files.


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

b0424dc9bb4c9035c1239d9d14bc720d4b6db9ad
 src/Rules/Library.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Rules/Library.hs b/src/Rules/Library.hs
index 1bf668d..a2cf010 100644
--- a/src/Rules/Library.hs
+++ b/src/Rules/Library.hs
@@ -40,7 +40,8 @@ buildPackageLibrary _ target @ (PartialTarget stage pkg) = do
         eObjs <- extraObjects target
         let objs = cObjs ++ splitObjs ++ eObjs
 
-        if "//*-0.*" ?== a
+        asuf <- libsuf way
+        if ("//*-0" <.> asuf) ?== a
         then build $ fullTarget target Ar [] [a] -- TODO: scan for dlls
         else build $ fullTarget target Ar objs [a]
 



More information about the ghc-commits mailing list