1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00

Add wasm to architectures returned by os/arch.

This commit is contained in:
Calvin Rose 2019-08-18 10:08:52 -05:00
parent 28fb2403d9
commit 81789a6930

View File

@ -98,6 +98,8 @@ static Janet os_arch(int32_t argc, Janet *argv) {
/* Check 64-bit vs 32-bit */ /* Check 64-bit vs 32-bit */
#if defined(JANET_ARCH_NAME) #if defined(JANET_ARCH_NAME)
return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME)); return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME));
#elif defined(__EMSCRIPTEN__)
return janet_ckeywordv("wasm");
#elif (defined(__x86_64__) || defined(_M_X64)) #elif (defined(__x86_64__) || defined(_M_X64))
return janet_ckeywordv("x86-64"); return janet_ckeywordv("x86-64");
#elif defined(__i386) || defined(_M_IX86) #elif defined(__i386) || defined(_M_IX86)
@ -822,6 +824,7 @@ static const JanetReg os_cfuns[] = {
"\t:arm\n" "\t:arm\n"
"\t:aarch64\n" "\t:aarch64\n"
"\t:sparc\n" "\t:sparc\n"
"\t:wasm\n"
"\t:unknown\n") "\t:unknown\n")
}, },
#ifndef JANET_REDUCED_OS #ifndef JANET_REDUCED_OS