1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

Everywhere: Add support for compilation under emscripten

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
This commit is contained in:
Ali Mohammad Pur 2022-11-20 06:53:14 +03:30 committed by Ali Mohammad Pur
parent 84502f53b5
commit 2110e7cf85
9 changed files with 50 additions and 16 deletions

View file

@ -19,6 +19,10 @@
# define AK_ARCH_AARCH64 1
#endif
#ifdef __wasm32__
# define AK_ARCH_WASM32 1
#endif
#if (defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8) || defined(_WIN64)
# define AK_ARCH_64_BIT
#else
@ -83,6 +87,10 @@
#endif
// clang-format on
#if defined(__EMSCRIPTEN__)
# define AK_OS_EMSCRIPTEN
#endif
#define ARCH(arch) (defined(AK_ARCH_##arch) && AK_ARCH_##arch)
#if ARCH(I386) || ARCH(X86_64)