On 8/6/25 8:49 AM, Kohei Tokunaga wrote:
Currently there are some engines that don't support wasm64 (e.g. unsupported
on Safari[1]). To mitigate this issue, the configure script allows the user
to use Emscripten's compatibility feature, "-sMEMORY64=2" flag[2].

Emscripten's "-sMEMORY64=2" flag still enables 64bit pointers in C code. But
this flag lowers the output binary into wasm32, with limiting the maximum
memory size to 4GB. So QEMU can run on wasm32 engines.

[1] https://webassembly.org/features/
[2] https://emscripten.org/docs/tools_reference/settings_reference.html#memory64

Signed-off-by: Kohei Tokunaga <ktokunaga.m...@gmail.com>
---
  configure | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)

V2:
- Changed --wasm64-memory64 flag to --wasm64-32bit-address-limit to avoid
   exposing the -sMEMORY64 value directly to the users. This can be
   considered as a significant change from the previous version of this patch
   so the Reviewed-by tag has been removed.
- Added a link to the Emscripten documentation about -sMEMORY64 in the
   configure script.


Thanks for the update,
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>


Reply via email to