diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-23 16:59:00 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | 654a3d46e4ec5919e3c2d0c90db252f6a670e44a (patch) | |
tree | eaf7d04c05d8840e3234ac88051a929a2ff46439 | |
parent | 631af3cc8c2bbab512d9df74a33b65ff6d2e4e1f (diff) | |
download | haskell-654a3d46e4ec5919e3c2d0c90db252f6a670e44a.tar.gz |
rts: RtsStartup: don't call resetTerminalSettings, freeThreadingResources on wasm32
This patch prevents resetTerminalSettings and freeThreadingResources
to be called on wasm32, since there is no TTY or threading on wasm32
at all.
-rw-r--r-- | rts/RtsStartup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 9495eb3b43..7e0afe5f92 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -516,7 +516,7 @@ hs_exit_(bool wait_foreign) #endif // set the terminal settings back to what they were -#if !defined(mingw32_HOST_OS) +#if !defined(mingw32_HOST_OS) && !defined(wasm32_HOST_ARCH) resetTerminalSettings(); #endif @@ -619,8 +619,10 @@ hs_exit_(bool wait_foreign) // Free the various argvs freeRtsArgs(); +#if !defined(wasm32_HOST_ARCH) // Free threading resources freeThreadingResources(); +#endif exitIpe(); } |