Support building on Android arm aarch64 x86 x86_64
1. Add cmake support in CMakeLists.txt according to https://developer.android.com/ndk/guides/other_build_systems
2. Resolve symbols errors
3. Backport fixes from 438ed42311
> QEMU relies on two optimization for ppc64 and arm:
>
> 1. if(0) /* optimized code */
> 2. assert(0); /* optimized code */
>
> But the assert on mingw32 doesn't have noreturn attribute which prevents
> the second optimization and some code is reverted to the original code
> to fit in the first optimization.
>
> The assert implementation is copied from glib as qemu did.
Unfortunately, NDK also doesn't have an assert implementation qemu prefers.
This commit is contained in:
@ -154,7 +154,8 @@ struct uc_struct;
|
||||
* code that is unreachable when features are disabled.
|
||||
* All supported versions of Glib's g_assert() satisfy this requirement.
|
||||
*/
|
||||
#ifdef __MINGW32__
|
||||
// Unfortunately, NDK also has this problem.
|
||||
#if defined(__MINGW32__ ) || defined(__ANDROID__)
|
||||
#undef assert
|
||||
#define assert(x) g_assert(x)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user