Add an option to build without libuv
There is increasing interest in running Julia in environments where
libuv is not available (JSVM, baremetal library OSes, etc). This adds
a make file option to disable building libuv entirely and fixes up
the bootstrap process to go through despite libuv not being available.
There is of course a question of whether instead of this it makes sense
to just port libuv to those platforms, but I suspect the answer is no,
because the most core part of libuv (async sockets, the event loop,
spawning processes), must either have a completely different implementation
or is unavailable entirely. Particularly for JSVM it is also unlikely
that libuv upstream is particularly interested, because JavaScript already
runs natively in JSVM. One slightly weird part is that these platforms
do generally implement POSIX where possible, so in a number of instances,
I had to replace the libuv calls (which wrap POSIX calls on non-Windows
platforms) by the corresponding POSIX calls.
Long term I see a few options:
- Expand libuv support for these new platforms
- Seperate libuv into two libraries, one for async IO, process spawning, event
loop etc, and one for the POSIX-compat layer on Windows.
- Use POSIX calls everywhere on platforms that support it and use libuv
for windows support where necessary (since windows does also implement
POSIX for some things).
However, until then, this build flag is useful as a basis for rebuilding
these abstraction on top of the JSVM APIs and for simplifying boostrap
on other platforms. However, I don't envision this to be a supported or
tested configuration on platforms where libuv is otherwise available.