Add Windows to NoSharedLibsPlatformList
authorAustin Seipp <austin@well-typed.com>
Mon, 13 Jan 2014 06:21:18 +0000 (00:21 -0600)
committerAustin Seipp <austin@well-typed.com>
Mon, 13 Jan 2014 06:21:18 +0000 (00:21 -0600)
We're punting on full -dynamic and -dynamic-too support for Windows
right now, since it's still unstable. Also, ensure "Support dynamic-too"
in `ghc --info` is set to "NO" for Cabal.

See issues #7134, #8228, and #5987

Signed-off-by: Austin Seipp <austin@well-typed.com>
compiler/main/DynFlags.hs
mk/config.mk.in

index 06d1ed9..734e7e9 100644 (file)
@@ -3563,7 +3563,7 @@ compilerInfo dflags
        ("Support SMP",                 cGhcWithSMP),
        ("Tables next to code",         cGhcEnableTablesNextToCode),
        ("RTS ways",                    cGhcRTSWays),
-       ("Support dynamic-too",         "YES"),
+       ("Support dynamic-too",         if isWindows then "NO" else "YES"),
        ("Support parallel --make",     "YES"),
        ("Dynamic by default",          if dYNAMIC_BY_DEFAULT dflags
                                        then "YES" else "NO"),
@@ -3574,6 +3574,8 @@ compilerInfo dflags
        ("LibDir",                      topDir dflags),
        ("Global Package DB",           systemPackageConfig dflags)
       ]
+  where
+    isWindows = platformOS (targetPlatform dflags) == OSMinGW32
 
 #include "../includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs"
 
index f61ecc0..59d48c4 100644 (file)
@@ -94,22 +94,11 @@ 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=100
-endif
-
 # Some platforms don't support shared libraries
-NoSharedLibsPlatformList = arm-unknown-linux powerpc-unknown-linux
+NoSharedLibsPlatformList = arm-unknown-linux \
+       powerpc-unknown-linux \
+       x86_64-unknown-mingw32 \
+       i386-unknown-mingw32
 
 ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
 NoSharedLibsPlatformList += i386-unknown-solaris2