The 'visibility%' gyp variable was designed as an override mechanism for
old (<=3.4) versions of gcc that don't know about -fvisibility=hidden.
It turns out it's fairly easy for embedders to muck up the define, as
witnessed by the fact that node.js is currently leaking internal libuv
symbols due to not properly setting 'visibility%'.
While that could be fixed by tweaking node.js, because we don't support
gcc 3.4 anymore and haven't for a long time, making -fvisibility=hidden
the default here seems all around easier.
PR-URL: https://github.com/libuv/libuv/pull/847
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
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>
The clang and gcc_version defines were used to:
1. Conditionally enable -fvisibility=hidden, a switch introduced in
gcc 4.0. Because 4.2 is the minimum supported version, we can
make it unconditional. People that want to build with older
versions, can use '-Dvisibility='.
2. To conditionally enable -Wno-dollar-in-identifier-extension,
an Apple extension that suppressed warnings about sigils in
dtrace probe names. Dtrace probes were removed in cb514002.
PR-URL: https://github.com/libuv/libuv/pull/76
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
gcc 4.2.1 as shipped with Xcode complains incessantly about aliasing
warnings, which, while technically true, disregards the fact that the
aliased types have the same layout in memory. Squelch the warnings.
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.