diff options
-rw-r--r-- | libraries/base/GHC/Event/Manager.hs | 17 | ||||
-rwxr-xr-x[-rw-r--r--] | testsuite/tests/rts/flags/T20006.hs | 0 |
2 files changed, 15 insertions, 2 deletions
diff --git a/libraries/base/GHC/Event/Manager.hs b/libraries/base/GHC/Event/Manager.hs index 569473309f..b086cbe748 100644 --- a/libraries/base/GHC/Event/Manager.hs +++ b/libraries/base/GHC/Event/Manager.hs @@ -148,7 +148,9 @@ callbackTableVar mgr fd = emFds mgr ! hashFd fd haveOneShot :: Bool {-# INLINE haveOneShot #-} -#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE) +#if defined(darwin_HOST_OS) || defined(ios_HOST_OS) +haveOneShot = False +#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE) haveOneShot = True #else haveOneShot = False @@ -361,9 +363,20 @@ registerFd mgr cb fd evs lt = do return r {-# INLINE registerFd #-} +{- + Building GHC with parallel IO manager on Mac freezes when + compiling the dph libraries in the phase 2. As workaround, we + don't use oneshot and we wake up an IO manager on Mac every time + when we register an event. + + For more information, please read: + https://gitlab.haskell.org/ghc/ghc/issues/7651 +-} -- | Wake up the event manager. wakeManager :: EventManager -> IO () -#if defined(HAVE_EPOLL) || defined(HAVE_KQUEUE) +#if defined(darwin_HOST_OS) || defined(ios_HOST_OS) +wakeManager mgr = sendWakeup (emControl mgr) +#elif defined(HAVE_EPOLL) || defined(HAVE_KQUEUE) wakeManager _ = return () #else wakeManager mgr = sendWakeup (emControl mgr) diff --git a/testsuite/tests/rts/flags/T20006.hs b/testsuite/tests/rts/flags/T20006.hs index d82a4bd93b..d82a4bd93b 100644..100755 --- a/testsuite/tests/rts/flags/T20006.hs +++ b/testsuite/tests/rts/flags/T20006.hs |