host_os=darwin
elif check_define EMSCRIPTEN ; then
host_os=emscripten
- cpu=wasm32
cross_compile="yes"
else
# This is a fatal error, but don't report it yet, because we
cpu="aarch64"
elif check_define __loongarch64 ; then
cpu="loongarch64"
+elif check_define EMSCRIPTEN ; then
+ error_exit "wasm32 or wasm64 must be specified to the cpu flag"
else
# Using uname is really broken, but it is just a fallback for architectures
# that are going to use TCI anyway
wasm32)
CPU_CFLAGS="-m32"
;;
+ wasm64)
+ CPU_CFLAGS="-m64 -sMEMORY64=1"
+ ;;
esac
if test -n "$host_arch" && {
bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'emscripten']
supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
- 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32']
+ 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32', 'wasm64']
cpu = host_machine.cpu_family()
if not get_option('tcg_interpreter')
error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
endif
- elif host_arch == 'wasm32'
+ elif host_arch == 'wasm32' or host_arch == 'wasm64'
if not get_option('tcg_interpreter')
error('WebAssembly host requires --enable-tcg-interpreter')
endif