[Git][ghc/ghc][wip/davide/windows-dlls] WIP export-all-symbols from hadrian
David Eichmann pushed to branch wip/davide/windows-dlls at Glasgow Haskell Compiler / GHC Commits: bbc55d25 by David Eichmann at 2026-06-29T15:44:19+01:00 WIP export-all-symbols from hadrian - - - - - 5 changed files: - hadrian/src/Settings/Packages.hs - libraries/base/src/Control/Concurrent.hs - libraries/ghc-internal/cbits/inputReady.c - libraries/ghc-internal/src/GHC/Internal/Float.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs Changes: ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -322,6 +322,7 @@ rtsPackageArgs = package rts ? do , Threaded `wayUnit` way ? arg "-DTHREADED_RTS" , notM targetSupportsSMP ? arg "-optc-DNOSMP" , isWinHost ? arg "-optl-Wl,--disable-runtime-pseudo-reloc" + <> arg "-optl-Wl,--export-all-symbols" -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs -- ===================================== libraries/base/src/Control/Concurrent.hs ===================================== @@ -132,6 +132,12 @@ import Control.Concurrent.Chan import Control.Concurrent.QSem import Control.Concurrent.QSemN + +-- Needed for windows dynamic builds +-- TODO we may need to disable inlining of ccalls by default +{-# NOINLINE waitFd #-} + + {- $conc_intro The concurrency extension for Haskell is described in the paper ===================================== libraries/ghc-internal/cbits/inputReady.c ===================================== @@ -150,6 +150,7 @@ compute_WaitForSingleObject_timeout(bool infinite, Time remaining) * 1 => Input ready, 0 => not ready, -1 => error * On error, sets `errno`. */ +__attribute__((dllexport)) int fdReady(int fd, bool write, int64_t msecs, bool isSock) { ===================================== libraries/ghc-internal/src/GHC/Internal/Float.hs ===================================== @@ -1633,13 +1633,19 @@ powerDouble :: Double -> Double -> Double powerDouble (D# x) (D# y) = D# (x **## y) foreign import ccall unsafe "isFloatNaN" isFloatNaN :: Float -> Int -foreign import ccall unsafe "isFloatInfinite" isFloatInfinite :: Float -> Int +{-# NOINLINE isFloatInfinite #-} +isFloatInfinite :: Float -> Int +isFloatInfinite x = cIsFloatInfinite x +foreign import ccall unsafe "isFloatInfinite" cIsFloatInfinite :: Float -> Int foreign import ccall unsafe "isFloatDenormalized" isFloatDenormalized :: Float -> Int foreign import ccall unsafe "isFloatNegativeZero" isFloatNegativeZero :: Float -> Int foreign import ccall unsafe "isFloatFinite" isFloatFinite :: Float -> Int foreign import ccall unsafe "isDoubleNaN" isDoubleNaN :: Double -> Int -foreign import ccall unsafe "isDoubleInfinite" isDoubleInfinite :: Double -> Int +{-# NOINLINE isDoubleInfinite #-} +isDoubleInfinite :: Double -> Int +isDoubleInfinite x = cIsDoubleInfinite x +foreign import ccall unsafe "isDoubleInfinite" cIsDoubleInfinite :: Double -> Int foreign import ccall unsafe "isDoubleDenormalized" isDoubleDenormalized :: Double -> Int foreign import ccall unsafe "isDoubleNegativeZero" isDoubleNegativeZero :: Double -> Int foreign import ccall unsafe "isDoubleFinite" isDoubleFinite :: Double -> Int ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Error.hs ===================================== @@ -109,6 +109,14 @@ import GHC.Internal.Num import GHC.Internal.Base ( String, otherwise, return, ($) ) import GHC.Internal.Types ( Bool(..) ) + + +-- Needed for windows dynamic builds +-- TODO we may need to disable inlining of ccalls by default +{-# NOINLINE getErrno #-} + + + -- "errno" type -- ------------ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bbc55d25b641b39dd35222701e5d3011... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bbc55d25b641b39dd35222701e5d3011... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
David Eichmann (@DavidEichmann)