1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

AK+Lagom: Make it possible to build for iOS

This commit makes it possible to build AK and most of Lagom for iOS,
based on the work for the Ladybird build demoed on discord:
1211987732
This commit is contained in:
Filiph Siitam Sandström 2024-02-27 14:32:29 +01:00 committed by Andrew Kaster
parent 2dce453f11
commit fd694e8672
17 changed files with 44 additions and 31 deletions

View file

@ -12,9 +12,9 @@
#ifdef AK_OS_SERENITY
# include <serenity.h>
#elif defined(AK_OS_LINUX) or defined(AK_LIBC_GLIBC) or defined(AK_OS_MACOS) or defined(AK_OS_NETBSD) or defined(AK_OS_SOLARIS) or defined(AK_OS_HAIKU)
#elif defined(AK_OS_LINUX) || defined(AK_LIBC_GLIBC) || defined(AK_OS_MACOS) || defined(AK_OS_IOS) || defined(AK_OS_NETBSD) || defined(AK_OS_SOLARIS) || defined(AK_OS_HAIKU)
# include <pthread.h>
#elif defined(AK_OS_FREEBSD) or defined(AK_OS_OPENBSD)
#elif defined(AK_OS_FREEBSD) || defined(AK_OS_OPENBSD)
# include <pthread.h>
# include <pthread_np.h>
#elif defined(AK_OS_WINDOWS)
@ -54,7 +54,7 @@ StackInfo::StackInfo()
VERIFY_NOT_REACHED();
}
pthread_attr_destroy(&attr);
#elif defined(AK_OS_MACOS)
#elif defined(AK_OS_MACOS) || defined(AK_OS_IOS)
// NOTE: !! On MacOS, pthread_get_stackaddr_np gives the TOP of the stack, not the bottom!
FlatPtr top_of_stack = (FlatPtr)pthread_get_stackaddr_np(pthread_self());
m_size = (size_t)pthread_get_stacksize_np(pthread_self());