summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2017-08-29 23:09:09 +0100
committerTamar Christina <tamar@zhox.com>2017-08-29 23:09:09 +0100
commit5f6a82040694f7c8c2b394c1b418c0167b963e0b (patch)
treec176440e824dd48e2ee54814272642ce453f664f /ghc.mk
parent3c6b2fc3b5ca11a5410405664e4640767ef941dd (diff)
downloadhaskell-5f6a82040694f7c8c2b394c1b418c0167b963e0b.tar.gz
Add gen-dll as replacement for dll-split
Summary: This tool can be used to generate dll's for any list of object files given to it. It will then repartition them automatically to fit within a dll and generates as many dll's as needed to do this. Cyclic dependencies between these generated dlls are handle automatically so there is no need to tell it how to partition. It is also a lot more general than `dll-split` as it is able to split any package not just `libGHC`. It also uses a trick using GNU style import libraries to hide the splitting from the rest of the pipeline. Which means come linking time you don't need to know which dll contains what symbol or how many split dlls were created. The import libraries are by default created with libtool. However since libtool is BFD based it is very slow. So if present and detected by configure the `genlib` tool from the msys2 project is used. This makes a difference of about ~45 minutes when compiling. To install `genlib` run `pacman -Sy mingw-w64-$(uname -m)-tools-git`. More detailed explaination of the process can be found here https://ghc.haskell.org/trac/ghc/wiki/WindowsDynamicLinking Test Plan: ./validate Reviewers: austin, hvr, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: snowleopard, rwbarton, thomie, erikd, #ghc_windows_task_force GHC Trac Issues: #5987 Differential Revision: https://phabricator.haskell.org/D3883
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index 59fc0d365f..7f532df8ed 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -539,6 +539,9 @@ utils/runghc/dist-install/package-data.mk: $(fixed_pkg_prev)
iserv/stage2/package-data.mk: $(fixed_pkg_prev)
iserv/stage2_p/package-data.mk: $(fixed_pkg_prev)
iserv/stage2_dyn/package-data.mk: $(fixed_pkg_prev)
+ifeq "$(Windows_Host)" "YES"
+utils/gen-dll/dist-install/package-data.mk: $(fixed_pkg_prev)
+endif
# the GHC package doesn't live in libraries/, so we add its dependency manually:
compiler/stage2/package-data.mk: $(fixed_pkg_prev)
@@ -646,6 +649,9 @@ BUILD_DIRS += includes
BUILD_DIRS += rts
BUILD_DIRS += bindisttest
BUILD_DIRS += utils/genapply
+ifeq "$(Windows_Host)" "YES"
+BUILD_DIRS += utils/gen-dll
+endif
# When cleaning, don't add any library packages to BUILD_DIRS. We include
# ghc.mk files for all BUILD_DIRS, but they don't exist until after running
@@ -1393,6 +1399,7 @@ distclean : clean
$(call removeFiles,ghc/ghc-bin.cabal)
$(call removeFiles,libraries/ghci/ghci.cabal)
$(call removeFiles,utils/runghc/runghc.cabal)
+ $(call removeFiles,utils/gen-dll/gen-dll.cabal)
$(call removeFiles,settings)
$(call removeFiles,docs/users_guide/ug-book.xml)
$(call removeFiles,docs/users_guide/ug-ent.xml)