Commit 3fb726d0 authored by Zejun Wu's avatar Zejun Wu Committed by Ben Gamari

Fix bindist for ghci library

Summary:
https://phabricator.haskell.org/D5169 built libghci for both vanilla way
and profiling way. We need to include both in the bindist list so they
will be installed.

Test Plan:
```
$ grep '^BuildFlavour' mk/build.mk
BuildFlavour=perf
$ make test_bindist
$ grep HSghc-prim bindist-list.uniq
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so
ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a
```
parent 3a509d29
...@@ -784,8 +784,11 @@ ifneq "$(BINDIST)" "YES" ...@@ -784,8 +784,11 @@ ifneq "$(BINDIST)" "YES"
# Make sure we have all the GHCi libs by the time we've built # Make sure we have all the GHCi libs by the time we've built
# ghc-stage2. # ghc-stage2.
# #
GHCI_LIBS = $(foreach lib,$(PACKAGES_STAGE1),$(libraries/$(lib)_dist-install_GHCI_LIB)) \ GHCI_LIBS = \
$(compiler_stage2_GHCI_LIB) $(foreach way,$(GhcLibWays),\
$(foreach lib,$(PACKAGES_STAGE1),\
$(libraries/$(lib)_dist-install_$(way)_GHCI_LIB)) \
$(compiler_stage2_$(way)_GHCI_LIB))
ifeq "$(UseArchivesForGhci)" "NO" ifeq "$(UseArchivesForGhci)" "NO"
ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS) ghc/stage2/build/tmp/$(ghc_stage2_PROG) : $(GHCI_LIBS)
......
...@@ -113,14 +113,14 @@ endif ...@@ -113,14 +113,14 @@ endif
# Build the GHCi library # Build the GHCi library
ifneq "$(filter $3, v p)" "" ifneq "$(filter $3, v p)" ""
$1_$2_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf) $1_$2_$3_GHCI_LIB = $1/$2/build/HS$$($1_$2_COMPONENT_ID).$$($3_osuf)
ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES"
# Don't put bootstrapping packages in the bindist # Don't put bootstrapping packages in the bindist
ifneq "$4" "0" ifneq "$4" "0"
BINDIST_LIBS += $$($1_$2_GHCI_LIB) BINDIST_LIBS += $$($1_$2_$3_GHCI_LIB)
endif endif
endif endif
$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT) $$($1_$2_$3_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_LD_SCRIPT)
$$(call cmd,LD_NO_GOLD) $$(CONF_LD_LINKER_OPTS_STAGE$4) -r $$(if $$($1_$2_LD_SCRIPT),$$($1_$2_LD_SCRIPT_CMD) $$($1_$2_LD_SCRIPT)) -o $$@ $$(EXTRA_LD_LINKER_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$(call cmd,LD_NO_GOLD) $$(CONF_LD_LINKER_OPTS_STAGE$4) -r $$(if $$($1_$2_LD_SCRIPT),$$($1_$2_LD_SCRIPT_CMD) $$($1_$2_LD_SCRIPT)) -o $$@ $$(EXTRA_LD_LINKER_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
# NB. LD_NO_GOLD above: see #14328 (symptoms: #14675,#14291). At least # NB. LD_NO_GOLD above: see #14328 (symptoms: #14675,#14291). At least
# some versions of ld.gold appear to have a bug that causes the # some versions of ld.gold appear to have a bug that causes the
...@@ -129,7 +129,7 @@ $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OB ...@@ -129,7 +129,7 @@ $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OB
ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES" ifeq "$$($1_$2_BUILD_GHCI_LIB)" "YES"
# Don't bother making ghci libs for bootstrapping packages # Don't bother making ghci libs for bootstrapping packages
ifneq "$4" "0" ifneq "$4" "0"
$(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) $(call all-target,$1_$2,$$($1_$2_$3_GHCI_LIB))
endif endif
endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES" endif # "$$($1_$2_BUILD_GHCI_LIB)" "YES"
endif # "$(filter $3, v p)" "" endif # "$(filter $3, v p)" ""
......
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