[commit: ghc] ghc-8.0: rules/build-prog: Ensure programs depend upon their transitive deps (4986837)

git at git.haskell.org git at git.haskell.org
Tue May 17 17:33:30 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/4986837f8168cacf95c24fecc84d7b36c47f3c11/ghc

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

commit 4986837f8168cacf95c24fecc84d7b36c47f3c11
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue May 17 18:05:24 2016 +0200

    rules/build-prog: Ensure programs depend upon their transitive deps
    
    Previously programs only depended upon the direct dependencies; while I
    would have thought that this would be sufficient, somehow we were
    getting to the link step of building `ghc-pkg` before `ghc-boot-th` was
    built (despite the fact that `ghc-boot` has a direct dependency on
    `ghc-boot-th`).
    
    See #12078.
    
    (cherry picked from commit 5d80d14196ef048ffe037b2d92af2e9af0cb9e19)


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

4986837f8168cacf95c24fecc84d7b36c47f3c11
 rules/build-prog.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 74bcc4a..82c55a7 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -197,8 +197,10 @@ ifneq "$$(BINDIST)" "YES"
 # The quadrupled $'s here are because the _<way>_LIB variables aren't
 # necessarily set when this part of the makefile is read
 $1/$2/build/tmp/$$($1_$2_PROG) $1/$2/build/tmp/$$($1_$2_PROG).dll : \
-    $$(foreach dep,$$($1_$2_DEP_COMPONENT_IDS),\
+    $$(foreach dep,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),\
         $$$$($$(dep)_dist-$(if $(filter 0,$3),boot,install)_PROGRAM_DEP_LIB))
+# Workaround: We use TRANSITIVE_DEP_COMPONENT_IDS here as a workaround for
+# Trac #12078.
 
 $1_$2_PROG_NEEDS_C_WRAPPER = NO
 $1_$2_PROG_INPLACE = $$($1_$2_PROG)



More information about the ghc-commits mailing list