David Eichmann pushed to branch wip/davide/windows-dlls at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • hadrian/src/Settings/Packages.hs
    ... ... @@ -322,6 +322,7 @@ rtsPackageArgs = package rts ? do
    322 322
               , Threaded  `wayUnit` way          ? arg "-DTHREADED_RTS"
    
    323 323
               , notM targetSupportsSMP           ? arg "-optc-DNOSMP"
    
    324 324
               , isWinHost                        ? arg "-optl-Wl,--disable-runtime-pseudo-reloc"
    
    325
    +                                            <> arg "-optl-Wl,--export-all-symbols"
    
    325 326
     
    
    326 327
                 -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs
    
    327 328
                 --
    

  • libraries/ghc-internal/cbits/inputReady.c
    ... ... @@ -150,6 +150,7 @@ compute_WaitForSingleObject_timeout(bool infinite, Time remaining)
    150 150
      *   1 => Input ready, 0 => not ready, -1 => error
    
    151 151
      * On error, sets `errno`.
    
    152 152
      */
    
    153
    +__attribute__((dllexport))
    
    153 154
     int
    
    154 155
     fdReady(int fd, bool write, int64_t msecs, bool isSock)
    
    155 156
     {
    

  • libraries/ghc-internal/src/GHC/Internal/Float.hs
    ... ... @@ -1633,13 +1633,19 @@ powerDouble :: Double -> Double -> Double
    1633 1633
     powerDouble  (D# x) (D# y) = D# (x **## y)
    
    1634 1634
     
    
    1635 1635
     foreign import ccall unsafe "isFloatNaN" isFloatNaN :: Float -> Int
    
    1636
    -foreign import ccall unsafe "isFloatInfinite" isFloatInfinite :: Float -> Int
    
    1636
    +{-# NOINLINE isFloatInfinite #-}
    
    1637
    +isFloatInfinite :: Float -> Int
    
    1638
    +isFloatInfinite x = cIsFloatInfinite x
    
    1639
    +foreign import ccall unsafe "isFloatInfinite" cIsFloatInfinite :: Float -> Int
    
    1637 1640
     foreign import ccall unsafe "isFloatDenormalized" isFloatDenormalized :: Float -> Int
    
    1638 1641
     foreign import ccall unsafe "isFloatNegativeZero" isFloatNegativeZero :: Float -> Int
    
    1639 1642
     foreign import ccall unsafe "isFloatFinite" isFloatFinite :: Float -> Int
    
    1640 1643
     
    
    1641 1644
     foreign import ccall unsafe "isDoubleNaN" isDoubleNaN :: Double -> Int
    
    1642
    -foreign import ccall unsafe "isDoubleInfinite" isDoubleInfinite :: Double -> Int
    
    1645
    +{-# NOINLINE isDoubleInfinite #-}
    
    1646
    +isDoubleInfinite :: Double -> Int
    
    1647
    +isDoubleInfinite x = cIsDoubleInfinite x
    
    1648
    +foreign import ccall unsafe "isDoubleInfinite" cIsDoubleInfinite :: Double -> Int
    
    1643 1649
     foreign import ccall unsafe "isDoubleDenormalized" isDoubleDenormalized :: Double -> Int
    
    1644 1650
     foreign import ccall unsafe "isDoubleNegativeZero" isDoubleNegativeZero :: Double -> Int
    
    1645 1651
     foreign import ccall unsafe "isDoubleFinite" isDoubleFinite :: Double -> Int
    

  • libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs
    ... ... @@ -109,6 +109,15 @@ import GHC.Internal.Num
    109 109
     import GHC.Internal.Base ( String, otherwise, return, ($) )
    
    110 110
     import GHC.Internal.Types ( Bool(..) )
    
    111 111
     
    
    112
    +
    
    113
    +
    
    114
    +-- Needed for windows dynamic builds
    
    115
    +-- TODO we may need to disable inlining of ccalls by default
    
    116
    +{-# NOINLINE getErrno #-}
    
    117
    +{-# NOINLINE waitFd #-}
    
    118
    +
    
    119
    +
    
    120
    +
    
    112 121
     -- "errno" type
    
    113 122
     -- ------------
    
    114 123