[commit: ghc] wip/nfs-locking: Move need of inplaceLibCopyTargets to top-level (#388) (0c67f7d)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:55:45 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/0c67f7d21536a4ca305758516bce7ccd0f40db7b/ghc
>---------------------------------------------------------------
commit 0c67f7d21536a4ca305758516bce7ccd0f40db7b
Author: Zhen Zhang <izgzhen at gmail.com>
Date: Tue Aug 15 20:34:32 2017 +0800
Move need of inplaceLibCopyTargets to top-level (#388)
>---------------------------------------------------------------
0c67f7d21536a4ca305758516bce7ccd0f40db7b
src/Rules.hs | 12 +++++++-----
src/Rules/Program.hs | 5 ++---
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/Rules.hs b/src/Rules.hs
index d55a578..4077dc6 100644
--- a/src/Rules.hs
+++ b/src/Rules.hs
@@ -24,7 +24,8 @@ import qualified Rules.Perl
import qualified Rules.Program
import qualified Rules.Register
import Settings
-import Settings.Path
+import Settings.Path (inplaceLibCopyTargets, pkgLibraryFile,
+ pkgSetupConfigFile, pkgHaddockFile)
import Target
import Utilities
@@ -41,10 +42,11 @@ topLevelTargets = action $ do
libs <- concatForM [Stage0, Stage1] $ \stage ->
concatForM libraryPackages $ packageTargets stage
prgs <- concatForM programsStage1Only $ packageTargets Stage0
- return $ libs ++ prgs
- else
- concatForM allStages $ \stage ->
- concatForM (knownPackages \\ [rts, libffi]) $ packageTargets stage
+ return $ libs ++ prgs ++ inplaceLibCopyTargets
+ else do
+ targets <- concatForM allStages $ \stage ->
+ concatForM (knownPackages \\ [rts, libffi]) $ packageTargets stage
+ return $ targets ++ inplaceLibCopyTargets
-- | Return the list of targets associated with a given 'Stage' and 'Package'.
packageTargets :: Stage -> Package -> Action [FilePath]
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index 6ca514f..edef17f 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -11,7 +11,8 @@ import Oracles.PackageData
import Oracles.Setting
import Rules.Wrappers
import Settings
-import Settings.Path
+import Settings.Path (buildPath, inplaceLibBinPath, rtsContext, objectPath,
+ inplaceLibPath, inplaceBinPath)
import Target
import Utilities
@@ -26,8 +27,6 @@ buildProgram rs context at Context {..} = when (isProgram package) $ do
context' <- programContext stage package
buildBinaryAndWrapper rs context' bin
- when (package == ghc) $ want inplaceLibCopyTargets
-
-- Rules for programs built in install directories
when (stage == Stage0 || package == ghc) $ do
-- Some binaries in inplace/bin are wrapped
More information about the ghc-commits
mailing list