[commit: ghc] wip/nfs-locking: Fix incorrect context when reading BuildGhciLib flag. (9207f25)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:02:14 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/9207f2530763c2bace7708cac77c767e596035da/ghc
>---------------------------------------------------------------
commit 9207f2530763c2bace7708cac77c767e596035da
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Feb 14 22:57:17 2016 +0000
Fix incorrect context when reading BuildGhciLib flag.
>---------------------------------------------------------------
9207f2530763c2bace7708cac77c767e596035da
src/Rules/Program.hs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index f00dd59..00f4c52 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -85,18 +85,18 @@ buildBinary context @ (Context stage package _) bin = do
depNames <- interpretInContext context $ getPkgDataList TransitiveDepNames
let libStage = min stage Stage1 -- libraries are built only in Stage0/1
libContext = vanillaContext libStage package
- pkgs <- interpretInContext libContext getPackages
- ghciFlag <- interpretInContext libContext $ getPkgData BuildGhciLib
+ pkgs <- interpretInContext libContext getPackages
let deps = matchPackageNames (sort pkgs) (map PackageName $ sort depNames)
- ghci = ghciFlag == "YES" && stage == Stage1
libs <- fmap concat . forM deps $ \dep -> do
+ let depContext = vanillaContext libStage dep
+ ghciFlag <- interpretInContext depContext $ getPkgData BuildGhciLib
libFiles <- fmap concat . forM ways $ \way -> do
libFile <- pkgLibraryFile libStage dep way
lib0File <- pkgLibraryFile0 libStage dep way
dll0 <- needDll0 libStage dep
return $ libFile : [ lib0File | dll0 ]
ghciLib <- pkgGhciLibraryFile libStage dep
- return $ libFiles ++ [ ghciLib | ghci ]
+ return $ libFiles ++ [ ghciLib | ghciFlag == "YES" && stage == Stage1 ]
let binDeps = if package == ghcCabal && stage == Stage0
then [ pkgPath package -/- src <.> "hs" | src <- hSrcs ]
else objs
More information about the ghc-commits
mailing list