The build script needs to properly specify the target as android
so the gyp build scripts can properly leverage cross compilation
using the android NDK.
PR-URL: https://github.com/libuv/libuv/pull/433
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Gyp will try a parallel build if it detect the system has >1 processor.
This functionality depends on the Python "multiprocessing" package. The
multiprocessing package on Windows requires that the top-level module is
importable as a module, see:
http://docs.python.org/2/library/multiprocessing.html#windows
This fixes issue #984.
Work around the build name issues by instead manually adding the build
target for android builds using '-DOS=android'
This additionally resolves problems caused by the OS variable being
rewritten from "android" to "linux" in gyp. This causes errors, as
real-time support (-lrt) and pthread support (-lpthread) is not
available in the android NDK toolchain as libraries.
The functions present in these libraries are included automatically
during the build instead during the android compilation process.
Tested most of my compilation in the previous patch on NodeJS
and extracted the patches from there. This patch ensures libuv
will be capable of building standalone as well, both with gyp
and Makefiles.
Build documentation was added to the README.md file.
Some tests are failing, and I have not heavily investigated
the reasons. The failures are generally on errors, and are
likely related to differences between fully POSIX-compatible
systems and android.