-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Conversation
Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion. The following commiters were not found in the CLA:
Please see CONTRIBUTING.md for more information |
Resolved the issue that had me closing the pull request. Sorry for the confusion. |
/cc @isaacs - apparently the CLA is in your inbox. |
Will update this PR with renamed defines and a new PR dependency in libuv tomorrow. Please hold. :) |
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], | ||
'ldflags': [ '-pthread', '-rdynamic' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't remove -pthread. Either special-case this or add an android-specific fix-up:
['OS=="android"', {
'ldflags!': ['-pthread'] # remove -pthread from linker flags
}]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? It's on line 166?
Resolves minor discrepancies between android and standard POSIX systems. In addition, some configure parameters were added, and a helper-script for android configuration. Ideally, this script should be merged into the standard configure script. To build for android, source the android-configure script with an NDK path: > source ./android-configure ~/android-ndk-r8d This will create an android standalone toolchain and export the necessary environment parameters. After that, build as normal: > make -j8 After the build, you should now have android-compatible NodeJS binaries.
Thanks Linus, landed with some nudging in 5e4e8ec. |
since this has landed, I want to raise an issue I encountered: |
So will this merged pull request ever be some foundation of bringing Node.js to Android? I hope someone is going to at least discuss it around Walker Creek Ranch. |
Well, with this patch you should be able to build node as an android
|
Just several questions:
|
Alright, I'm no authority on this, but I'll do my best to provide some info:
|
@bnoordhuis I ran a test to ensure everything builds, and noticed the cares version is not up to date. After updating cares to the latest version, the build works fine. @Mithgol Also did some testing to determine how to best get REPL access. The easiest solution is to copy node straight to /data/local/tmp. |
Upgraded in 58e4eda. |
Trying to build node.js for android on a Linux system, and I'm getting an error about Any hints? |
It's picking up the linux config for c-ares, not the android one. There's a separate android-configure script in the top-level directory. |
The android-configure script doesn't pick up the --system flag that's needed to make the toolchain on my system, so I have to run the commands in it manually. I think v0.10 doesn't work, whereas v0.11 appears to. |
you can just add the --system flag yourself. |
Adds an ANDROID define and resolves minor discrepancies between
android and standard POSIX systems. In addition, some configure
parameters were added, and a helper-script for android configuration.
Ideally, this script should next be merged into the standard
configure script.
Note: This depends on the respective pull-requests in uv and cares:
joyent/libuv#825
https://github.com/piscisaureus/cares/pull/2
To build for android, source the android-configure script
with an NDK path:
This will create an android standalone toolchain and export the
necessary commands.
After that, build as normal:
After the build, you should now have android-compatible NodeJS
binaries.