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

AK: Add support for building on Android with API version >= 30

This commit is contained in:
Andrew Kaster 2022-07-11 01:04:39 -06:00 committed by Linus Groh
parent 686c15149e
commit 3b15addbc8
2 changed files with 17 additions and 2 deletions

View file

@ -27,6 +27,21 @@
# define AK_OS_BSD_GENERIC
#endif
// FIXME: Remove clang-format suppression after https://github.com/llvm/llvm-project/issues/56602 resolved
// clang-format off
#if defined(__ANDROID__)
# define STR(x) __STR(x)
# define __STR(x) #x
# if __ANDROID_API__ < 30
# pragma message "Invalid android API " STR(__ANDROID_API__)
# error "Build configuration not tested on configured Android API version"
# endif
# undef STR
# undef __STR
# define AK_OS_ANDROID
#endif
// clang-format on
#define ARCH(arch) (defined(AK_ARCH_##arch) && AK_ARCH_##arch)
#if ARCH(I386) || ARCH(X86_64)