[commit: ghc] master: Don't try to use -dynamic-too on Windows (20d8e8c)

Ian Lynagh igloo at earth.li
Sun May 26 01:03:32 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/20d8e8c3e15c9d559db32c2ce1e9caf31572e5d8

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

commit 20d8e8c3e15c9d559db32c2ce1e9caf31572e5d8
Author: Ian Lynagh <ian at well-typed.com>
Date:   Wed May 22 13:59:21 2013 +0100

    Don't try to use -dynamic-too on Windows
    
    It doesn't work

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

 compiler/main/DynFlags.hs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index f206095..2319b92 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1188,7 +1188,12 @@ doDynamicToo dflags0 = let dflags1 = addWay' WayDyn dflags0
 -- | Used by 'GHC.newSession' to partially initialize a new 'DynFlags' value
 initDynFlags :: DynFlags -> IO DynFlags
 initDynFlags dflags = do
- refCanGenerateDynamicToo <- newIORef True
+ let -- We can't build with dynamic-too on Windows, as labels before
+     -- the fork point are different depending on whether we are
+     -- building dynamically or not.
+     platformCanGenerateDynamicToo
+         = platformOS (targetPlatform dflags) /= OSMinGW32
+ refCanGenerateDynamicToo <- newIORef platformCanGenerateDynamicToo
  refFilesToClean <- newIORef []
  refDirsToClean <- newIORef Map.empty
  refFilesToNotIntermediateClean <- newIORef []





More information about the ghc-commits mailing list