| 223 | } |
| 224 | |
| 225 | inline constexpr uint8_t HostArchType() noexcept { |
| 226 | #if defined(__x86_64__) || defined(_M_X64) |
| 227 | return UINT8_C(1); |
| 228 | #elif defined(__aarch64__) |
| 229 | return UINT8_C(2); |
| 230 | #elif defined(__riscv) && __riscv_xlen == 64 |
| 231 | return UINT8_C(3); |
| 232 | #elif defined(__arm__) && __ARM_ARCH == 7 |
| 233 | return UINT8_C(4); |
| 234 | #elif defined(__s390x__) |
| 235 | return UINT8_C(5); |
| 236 | #else |
| 237 | // Means universal wasm binary is not yet supported on this arch. |
| 238 | return UINT8_C(-1); |
| 239 | #endif |
| 240 | } |
| 241 | |
| 242 | } // namespace |
| 243 |