summaryrefslogtreecommitdiff
path: root/rules/build-package.mk
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-10-16 20:28:05 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-10-17 11:20:53 +0200
commit3340fe01bc6842c2cad53271541dce6699512ce0 (patch)
tree12a02f8bcea762711597bca8e182ab1f53feb9d4 /rules/build-package.mk
parent324e0ac650c85ac59c96965b17f2e292dd7e2de2 (diff)
downloadhaskell-3340fe01bc6842c2cad53271541dce6699512ce0.tar.gz
Build system: fix `make -j1` (#10973)
There are multiple hacks all over the build system to account for the fact that the ghc package uses different build subdirectories (stage1/stage2) than the other packages (dist/dist-install). One such hack filtered on 'ghc%', with the intention of filtering the ghc package only. After renaming bin-package-db to ghc-boot (d2f9972a35ce05ceb8a78893e433ef1df06f73ef, Phab:D1313, #10796), ghc-boot also got caught in the hack, which broke the build when running without parallelism. This patch replaces the before mentioned hack by a different one, such that filtering on 'ghc%' is no longer necessary. See Note [inconsistent distdirs]. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1333
Diffstat (limited to 'rules/build-package.mk')
-rw-r--r--rules/build-package.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/rules/build-package.mk b/rules/build-package.mk
index b514102a21..688e1d2ca5 100644
--- a/rules/build-package.mk
+++ b/rules/build-package.mk
@@ -135,6 +135,14 @@ $$(foreach way,$$($1_$2_WAYS),$$(eval \
$1_$2_PROGRAM_DEP_LIB = $$($1_$2_v_LIB) $$($1_$2_dyn_LIB)
$$($1_$2_COMPONENT_ID)_$2_PROGRAM_DEP_LIB = $$($1_$2_PROGRAM_DEP_LIB)
+# See Note [inconsistent distdirs] in rules/build-package-way.mk.
+ifeq "$$($1_PACKAGE) $2" "ghc stage1"
+$$($1_$2_COMPONENT_ID)_dist-boot_PROGRAM_DEP_LIB = $$($1_$2_PROGRAM_DEP_LIB)
+endif
+ifeq "$$($1_PACKAGE) $2" "ghc stage2"
+$$($1_$2_COMPONENT_ID)_dist-install_PROGRAM_DEP_LIB = $$($1_$2_PROGRAM_DEP_LIB)
+endif
+
# C and S files are possibly built the "dyn" way.
ifeq "$$(BuildSharedLibs)" "YES"
$(call c-objs,$1,$2,dyn)