diff options
| author | Mike Pall <mike> | 2020-06-23 03:24:40 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2020-06-23 03:24:40 +0200 |
| commit | 2e2fb8f6b5118e1a7996b76600c6ee98bfd5f203 (patch) | |
| tree | 6c649cb61e07dd2d82b7ea93f4388dd3fead96ce /src | |
| parent | 471f8936cbd6aa80a937e375fe53ecadab93696a (diff) | |
| download | luajit-2e2fb8f6b5118e1a7996b76600c6ee98bfd5f203.tar.gz luajit-2e2fb8f6b5118e1a7996b76600c6ee98bfd5f203.tar.bz2 luajit-2e2fb8f6b5118e1a7996b76600c6ee98bfd5f203.zip | |
OSX/iOS: Handle iOS simulator and ARM64 Macs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_arch.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lj_arch.h b/src/lj_arch.h index 240d0d16..baa7b663 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
| @@ -79,6 +79,7 @@ | |||
| 79 | #elif defined(__linux__) | 79 | #elif defined(__linux__) |
| 80 | #define LUAJIT_OS LUAJIT_OS_LINUX | 80 | #define LUAJIT_OS LUAJIT_OS_LINUX |
| 81 | #elif defined(__MACH__) && defined(__APPLE__) | 81 | #elif defined(__MACH__) && defined(__APPLE__) |
| 82 | #include "TargetConditionals.h" | ||
| 82 | #define LUAJIT_OS LUAJIT_OS_OSX | 83 | #define LUAJIT_OS LUAJIT_OS_OSX |
| 83 | #elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ | 84 | #elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ |
| 84 | defined(__NetBSD__) || defined(__OpenBSD__) || \ | 85 | defined(__NetBSD__) || defined(__OpenBSD__) || \ |
| @@ -117,10 +118,15 @@ | |||
| 117 | #define LJ_TARGET_LINUX (LUAJIT_OS == LUAJIT_OS_LINUX) | 118 | #define LJ_TARGET_LINUX (LUAJIT_OS == LUAJIT_OS_LINUX) |
| 118 | #define LJ_TARGET_OSX (LUAJIT_OS == LUAJIT_OS_OSX) | 119 | #define LJ_TARGET_OSX (LUAJIT_OS == LUAJIT_OS_OSX) |
| 119 | #define LJ_TARGET_BSD (LUAJIT_OS == LUAJIT_OS_BSD) | 120 | #define LJ_TARGET_BSD (LUAJIT_OS == LUAJIT_OS_BSD) |
| 120 | #define LJ_TARGET_IOS (LJ_TARGET_OSX && (LUAJIT_TARGET == LUAJIT_ARCH_ARM || LUAJIT_TARGET == LUAJIT_ARCH_ARM64)) | ||
| 121 | #define LJ_TARGET_POSIX (LUAJIT_OS > LUAJIT_OS_WINDOWS) | 121 | #define LJ_TARGET_POSIX (LUAJIT_OS > LUAJIT_OS_WINDOWS) |
| 122 | #define LJ_TARGET_DLOPEN LJ_TARGET_POSIX | 122 | #define LJ_TARGET_DLOPEN LJ_TARGET_POSIX |
| 123 | 123 | ||
| 124 | #if TARGET_OS_IPHONE | ||
| 125 | #define LJ_TARGET_IOS 1 | ||
| 126 | #else | ||
| 127 | #define LJ_TARGET_IOS 0 | ||
| 128 | #endif | ||
| 129 | |||
| 124 | #ifdef __CELLOS_LV2__ | 130 | #ifdef __CELLOS_LV2__ |
| 125 | #define LJ_TARGET_PS3 1 | 131 | #define LJ_TARGET_PS3 1 |
| 126 | #define LJ_TARGET_CONSOLE 1 | 132 | #define LJ_TARGET_CONSOLE 1 |
