Compiling with Win32 Release/MinSizeRel/RelWithDebInfo in VS2008 will cause "fatal error C1063: compiler limit: compiler stack overflow" problem.
Compiling with Win32 Debug or x64 does not have this problem.
You can easily bypass this problem by changing the optimization options /O1 and /O2 to /Od.
In VS2010, when _INTPTR is 0 or 1, UINTPTR_MAX is 0xFFFFFFFF.
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.
Compiling with Win32 Release/MinSizeRel/RelWithDebInfo in VS2008 will cause "fatal error C1063: compiler limit: compiler stack overflow" problem.
Compiling with Win32 Debug or x64 does not have this problem.
You can easily bypass this problem by changing the optimization options /O1 and /O2 to /Od.
In VS2010, when _INTPTR is 0 or 1, UINTPTR_MAX is 0xFFFFFFFF.
* Add setjmp wrapper
* Add to projects
* Use wrapper on x64
* Always build on x64 and exclude on win32
* Fix signature
* Add comments
* Add comments for os-win32.h
* Add extern decleration
* Support cmake Windows build
* Fix for MinGW