[commit: ghc] wip/nfs-locking: Fix wrapper build rules (9da5e17)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:26:28 UTC 2017


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

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

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

commit 9da5e17c26e1c9d256052fa065e8c331635b4c5b
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Aug 29 10:23:52 2017 +0100

    Fix wrapper build rules
    
    See #403


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

9da5e17c26e1c9d256052fa065e8c331635b4c5b
 src/Rules/Program.hs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index 13bfd34..0211cfe 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -14,6 +14,7 @@ import Settings.Packages.Rts
 import Target
 import Utilities
 
+-- | TODO: Drop code duplication
 buildProgram :: [(Resource, Int)] -> Package -> Rules ()
 buildProgram rs package = do
     forM_ [Stage0 ..] $ \stage -> do
@@ -25,11 +26,19 @@ buildProgram rs package = do
             buildBinaryAndWrapper rs context' bin
 
         -- Rules for the GHC package, which is built 'inplace'
-        when (package == ghc) $
+        when (package == ghc) $ do
             inplaceBinPath -/- programName context <.> exe %> \bin -> do
                 context' <- programContext stage package
                 buildBinaryAndWrapper rs context' bin
 
+            inplaceLibBinPath -/- programName context <.> exe %> \bin -> do
+                context' <- programContext stage package
+                buildBinary rs context' bin
+
+            inplaceLibBinPath -/- programName context <.> "bin" %> \bin -> do
+                context' <- programContext stage package
+                buildBinary rs context' bin
+
     -- Rules for other programs built in inplace directories
     when (package /= ghc) $ do
         let context0 = vanillaContext Stage0 package -- TODO: get rid of context0



More information about the ghc-commits mailing list