[commit: ghc] master: Temporarily lower unfolding threshold on Windows (9bb909b)

git at git.haskell.org git at git.haskell.org
Fri Nov 22 14:22:42 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9bb909bbcf280f137c7a379d05acf5bc21268e5b/ghc

>---------------------------------------------------------------

commit 9bb909bbcf280f137c7a379d05acf5bc21268e5b
Author: Austin Seipp <austin at well-typed.com>
Date:   Thu Nov 21 16:39:41 2013 -0600

    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 at well-typed.com>


>---------------------------------------------------------------

9bb909bbcf280f137c7a379d05acf5bc21268e5b
 mk/config.mk.in |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index 20bb1ed..780b303 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
 



More information about the ghc-commits mailing list