diff options
author | Austin Seipp <austin@well-typed.com> | 2013-11-21 16:39:41 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-11-22 08:04:53 -0600 |
commit | 9bb909bbcf280f137c7a379d05acf5bc21268e5b (patch) | |
tree | da0cbb99e822fbbd0f8166aa1f368fa653bbc27a /mk | |
parent | ac5ff6422fb9e143c38e6cdcf16280de200cb880 (diff) | |
download | haskell-9bb909bbcf280f137c7a379d05acf5bc21268e5b.tar.gz |
Temporarily lower unfolding threshold on Windows
This is a very temporary, very unsatisfactory hack to fix #5987
(for now.)
The included comments essentially say it all: we lower the unfolding
threshold to minimize some amount of exported symbols from the GHC
stage2 DLL. I unfortunately had to lower it quite substantially for the
dynamic stage2 build to pass.
As of this writing, the DLL split between ghc.dll and ghc-0.dll is
something like 26,000 vs 63,000 exported symbols, respectively. So we're
still quite in danger of tripping it, but I think we will be OK at this
exact moment.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/config.mk.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in index 20bb1ed4fe..780b3030f9 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -94,6 +94,20 @@ else TargetElf = YES endif +# Currently, on Windows, we artificially limit the unfolding creation +# threshold to minimize the number of exported symbols on Windows +# platforms in the stage2 DLL. This avoids a hard limit of 2^16 +# exported symbols in the windows dynamic linker. +# +# This is a pitifully low threshold (the default is 750,) but it +# reduced the symbol count by about ~7,000, bringing us back under the +# limit (for now.) +# +# See #5987 +ifeq "$(TargetOS_CPP)" "mingw32" +GhcStage2HcOpts += -funfolding-creation-threshold=300 +endif + # Some platforms don't support shared libraries NoSharedLibsPlatformList = arm-unknown-linux powerpc-unknown-linux |