Commit 0c67f7d2 authored by Zhen Zhang's avatar Zhen Zhang Committed by Andrey Mokhov
Browse files

Move need of inplaceLibCopyTargets to top-level (#388)

parent 5026b9c6
......@@ -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]
......
......@@ -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@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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment