summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-05-13 22:39:29 +0100
committerIan Lynagh <ian@well-typed.com>2013-05-14 13:49:09 +0100
commit60b86b04b2c214ef75b01371901a040933debf31 (patch)
treeed89503ca5c5039464692d0993b3525e209c99a6 /rules
parentff1a16a0bd630f97dc507f96977eaaae9d8df9a6 (diff)
downloadhaskell-60b86b04b2c214ef75b01371901a040933debf31.tar.gz
Fix the GHC package DLL-splitting
There's now an internal -dll-split flag, which we use to tell GHC how the GHC package is split into 2 separate DLLs. This is used by Packages.isDllName to determine whether a call is within the same DLL, or whether it is a call to another DLL.
Diffstat (limited to 'rules')
-rw-r--r--rules/build-package-data.mk2
-rw-r--r--rules/distdir-way-opts.mk8
2 files changed, 9 insertions, 1 deletions
diff --git a/rules/build-package-data.mk b/rules/build-package-data.mk
index c66825ed56..24299426e5 100644
--- a/rules/build-package-data.mk
+++ b/rules/build-package-data.mk
@@ -107,7 +107,7 @@ ifneq "$$($1_NO_CHECK)" "YES"
"$$(ghc-cabal_INPLACE)" check $1
endif
endif
- "$$(ghc-cabal_INPLACE)" configure $1 $2 --with-ghc="$$($1_$2_HC_CONFIG)" --with-ghc-pkg="$$($1_$2_GHC_PKG)" $$($1_CONFIGURE_OPTS) $$($1_$2_CONFIGURE_OPTS)
+ "$$(ghc-cabal_INPLACE)" configure $1 $2 "$$($1_$2_dll0_MODULES)" --with-ghc="$$($1_$2_HC_CONFIG)" --with-ghc-pkg="$$($1_$2_GHC_PKG)" $$($1_CONFIGURE_OPTS) $$($1_$2_CONFIGURE_OPTS)
ifeq "$$($1_$2_PROG)" ""
ifneq "$$($1_$2_REGISTER_PACKAGE)" "NO"
$$(call cmd,$1_$2_GHC_PKG) update --force $$($1_$2_GHC_PKG_OPTS) $1/$2/inplace-pkg-config
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index f288d3919e..23fdf7b20d 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -124,6 +124,14 @@ $1_$2_$3_ALL_HC_OPTS = \
$$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too))
ifeq "$3" "dyn"
+ifeq "$$(HostOS_CPP)" "mingw32"
+ifneq "$$($1_$2_dll0_MODULES)" ""
+$1_$2_$3_ALL_HC_OPTS += -dll-split $1/$2/dll-split
+endif
+endif
+endif
+
+ifeq "$3" "dyn"
ifneq "$4" "0"
ifeq "$$(TargetElf)" "YES"
$1_$2_$3_GHC_LD_OPTS += \