|
36 | 36 | // See: https://sourceforge.net/p/predef/wiki/Home/ |
37 | 37 |
|
38 | 38 | #if defined(__ARM_ARCH) |
| 39 | +#if defined(__ARM_ARCH_ISA_A64) |
| 40 | +#define MICROPY_PLATFORM_ARCH "aarch64" |
| 41 | +#else |
39 | 42 | #define MICROPY_PLATFORM_ARCH "arm" |
| 43 | +#endif |
40 | 44 | #elif defined(__x86_64__) || defined(_M_X64) |
41 | 45 | #define MICROPY_PLATFORM_ARCH "x86_64" |
42 | 46 | #elif defined(__i386__) || defined(_M_IX86) |
|
49 | 53 | #define MICROPY_PLATFORM_ARCH "" |
50 | 54 | #endif |
51 | 55 |
|
52 | | -#if defined(__GNUC__) |
| 56 | +#if defined(__clang__) |
| 57 | +#define MICROPY_PLATFORM_COMPILER \ |
| 58 | + "Clang " \ |
| 59 | + MP_STRINGIFY(__clang_major__) "." \ |
| 60 | + MP_STRINGIFY(__clang_minor__) "." \ |
| 61 | + MP_STRINGIFY(__clang_patchlevel__) |
| 62 | +#elif defined(__GNUC__) |
53 | 63 | #define MICROPY_PLATFORM_COMPILER \ |
54 | 64 | "GCC " \ |
55 | 65 | MP_STRINGIFY(__GNUC__) "." \ |
|
86 | 96 | #elif defined(_PICOLIBC__) |
87 | 97 | #define MICROPY_PLATFORM_LIBC_LIB "picolibc" |
88 | 98 | #define MICROPY_PLATFORM_LIBC_VER _PICOLIBC_VERSION |
| 99 | +#elif defined(__ANDROID__) |
| 100 | +#define MICROPY_PLATFORM_LIBC_LIB "bionic" |
| 101 | +#define MICROPY_PLATFORM_LIBC_VER MP_STRINGIFY(__ANDROID_API__) |
89 | 102 | #else |
90 | 103 | #define MICROPY_PLATFORM_LIBC_LIB "" |
91 | 104 | #define MICROPY_PLATFORM_LIBC_VER "" |
92 | 105 | #endif |
93 | 106 |
|
94 | | -#if defined(__linux) |
| 107 | +#if defined(__ANDROID__) |
| 108 | +#define MICROPY_PLATFORM_SYSTEM "Android" |
| 109 | +#elif defined(__linux) |
95 | 110 | #define MICROPY_PLATFORM_SYSTEM "Linux" |
96 | 111 | #elif defined(__unix__) |
97 | 112 | #define MICROPY_PLATFORM_SYSTEM "Unix" |
|
0 commit comments