@@ -52,7 +52,7 @@ qapi_trace_events = []
5252bsd_oses = [' gnu/kfreebsd' , ' freebsd' , ' netbsd' , ' openbsd' , ' dragonfly' , ' darwin' ]
5353supported_oses = [' windows' , ' freebsd' , ' netbsd' , ' openbsd' , ' darwin' , ' sunos' , ' linux' , ' emscripten' ]
5454supported_cpus = [' ppc' , ' ppc64' , ' s390x' , ' riscv32' , ' riscv64' , ' x86' , ' x86_64' ,
55- ' arm' , ' aarch64' , ' loongarch64' , ' mips' , ' mips64' , ' sparc64' , ' wasm32' ]
55+ ' arm' , ' aarch64' , ' loongarch64' , ' mips' , ' mips64' , ' sparc64' , ' wasm32' , ' wasm64 ' ]
5656
5757cpu = host_machine .cpu_family()
5858
@@ -393,6 +393,12 @@ elif host_os == 'windows'
393393 if compiler.get_id() == ' clang' and compiler.get_linker_id() != ' ld.lld'
394394 error (' On windows, you need to use lld with clang - use msys2 clang64/clangarm64 env' )
395395 endif
396+ elif host_os == ' emscripten'
397+ if cpu == ' wasm64'
398+ memory64 = get_option (' wasm64_memory64' )
399+ qemu_common_flags += [' -DWASM64_MEMORY64=' + memory64]
400+ qemu_ldflags += [' -sMEMORY64=' + memory64, ' -DWASM64_MEMORY64=' + memory64]
401+ endif
396402endif
397403
398404# Choose instruction set (currently x86-only)
@@ -916,7 +922,7 @@ if have_tcg
916922 if not get_option (' tcg_interpreter' )
917923 error (' Unsupported CPU @0@, try --enable-tcg-interpreter' .format(cpu))
918924 endif
919- elif host_arch == ' wasm32'
925+ elif host_arch == ' wasm32' or host_arch == ' wasm64 '
920926 if not get_option (' tcg_interpreter' )
921927 error (' WebAssembly host requires --enable-tcg-interpreter' )
922928 endif
0 commit comments