
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 5d59fc8f by Cheng Shao at 2025-09-28T19:26:27-04:00 rts: provide stub implementations of ExecPage functions for wasm This patch provides stub implementations of ExecPage functions for wasm. They are never actually invoked at runtime for any non-TNTC platform, yet they can cause link-time errors of missing symbols when the GHCi.InfoTable module gets linked into the final wasm module (e.g. a GHC API program). - - - - - 1 changed file: - rts/ExecPage.c Changes: ===================================== rts/ExecPage.c ===================================== @@ -10,15 +10,23 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { +#if defined(wasm32_HOST_ARCH) + return NULL; +#else ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; +#endif } void freezeExecPage(ExecPage *page) { +#if !defined(wasm32_HOST_ARCH) mprotectForLinker(page, getPageSize(), MEM_READ_EXECUTE); flushExec(getPageSize(), page); +#endif } void freeExecPage(ExecPage *page) { +#if !defined(wasm32_HOST_ARCH) munmapForLinker(page, getPageSize(), "freeExecPage"); +#endif } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d59fc8f98444998e7087fedae2d245e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d59fc8f98444998e7087fedae2d245e... You're receiving this email because of your account on gitlab.haskell.org.