Commit Graph

14 Commits

Author SHA1 Message Date
Mohammed Keyvanzadeh
a184d88591
build: add python 3.11 support for android
Add Python 3.11 support for configuring Node.js for Android.

PR-URL: https://github.com/nodejs/node/pull/45765
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-12-11 02:58:02 +00:00
BuShe Pie
ee9aac1f1c
build: rewritten the Android build system
Completely rewritten the Android build system using Python

Co-Authored-By: 东灯 <43312495+Lampese@users.noreply.github.com>
Co-Authored-By: Feng Yu <F3n67u@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/44207
Refs: https://github.com/nodejs/node/issues/36287
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2022-09-12 08:10:29 +00:00
BuShe
88d55d20d1
build: optimized and fixed building configuration to Android
PR-URL: https://github.com/nodejs/node/pull/44016
Reviewed-By: Yash Ladha <yash@yashladha.in>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
2022-08-07 11:17:20 +00:00
Issam E. Maghni
7afa7b9ab3
build: replace non-POSIX test -a|o
test/[ from sbase unix tools[1] throws "too many arguments" if -a or
-o is provided. The syntax has been marked obsolescent as per the
manual[2].

[1] http://core.suckless.org/sbase/
[2] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16

PR-URL: https://github.com/nodejs/node/pull/38731
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-21 15:47:16 -07:00
François-Denis Gonthier
6c50d744b3
build: do not "exit" a script meant to be "source"d
Running exit in a script meant to be sourced means the user shell will
exit, which prevents seeing the error message, and is generally very
annoying.
Fix the "android-configure" script to use "return" instead of "exit".

PR-URL: https://github.com/nodejs/node/pull/35520
Fixes: https://github.com/nodejs/node/issues/35519
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-12-27 16:49:11 +01:00
raisinten
2d167f0dc7 build: replace which with command -v
PR-URL: https://github.com/nodejs/node/pull/36118
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-11-19 19:33:28 +01:00
forfun414
50317c38a4
build: support android build on ndk version equal or above 23
change scripts and sources for android build, don't need standalone
toolchain after ndk 19, and use clang as default android target
compiler.

PR-URL: https://github.com/nodejs/node/pull/31521
Reviewed-By: Christian Clauss <cclauss@me.com>
2020-03-11 16:50:52 +01:00
TheBeastOfCaerbannog
757c90e53c build: don't create directory for NDK toolchain
Let make-standalone-toolchain.sh create directory.

PR-URL: https://github.com/nodejs/node/pull/11916
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-21 22:52:55 -07:00
Robert Chiras
a4b8000029 build: update android-configure script for npm
Now, that we can cross-compile node for Android, we also need to take
care of native node modules installed with npm. Since there is no way to
install and run npm on an Android device, we could instal node on host
and setup an environment for installing node modules and cross-compile
the native sources using Android NDK.
The changes to this script will allow npm, when installing a module, to
compile it using NDK.

In order to do this, the developer should do the following steps:
1. Compile and install node on host, using: configure, make and make
install
2. Build node for Android, using: source android-configure <path_to_ndk>
arch and make
3. Push node binary to Android device
4. Using the same session, configure npm arch using: npm config set
arch=<arch>
5. Install desired node modules using: npm install
6. Push installed node modules to Android device

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node/pull/6349
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-22 22:12:53 +02:00
Robert Chiras
271201fea9 build: add suport for x86 architecture
Modified android-configure script to support also x86 arch.
Currently added support only for ia32 target arch.
Also, compile openssl without asm, since using the asm sources will make
node fail to run on Android, because it adds text relocations.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node/pull/5544
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-22 19:17:28 +01:00
Evan Lucas
ecb840c14a build: use required platform in android-configure
The introduction of libuv 1.6.0 broke the android-configure script by
not specifying the correct platform. uv_os_homedir uses getpwuid_r
which was not made public until API level 21 on android.

The regression was introduced in a804026...b5cd2f0

PR-URL: https://github.com/nodejs/node/pull/2501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-24 15:58:25 -05:00
Giovanny Andres Gongora Granada
65d4d25f52 build: default to armv7+vfpv3 for android
Also add Android build instructions to the README.

PR-URL: https://github.com/iojs/io.js/pull/1307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-04 00:53:03 +02:00
Ben Noordhuis
4f68369643 build: disable v8 snapshots
Snapshots speed up start-up by a few milliseconds but are potentially
dangerous because of the fixed hash seed that is used for strings and
dictionaries, making collision denial-of-service attacks possible.

Release builds on iojs.org have snapshots disabled but source builds
did not, until now.

The risk for individual source builds is low; the binary gets a random
32 bits hash seed that should be hard to guess by an external attacker.

It's when binaries are distributed by, for example, a distro vendor
that the fixed hash seed becomes a vulnerability, because then it's
possible to target a large group of people at once.

People that really need the faster start-up time can use the new
--with-snapshot configure flag.

PR-URL: https://github.com/iojs/io.js/pull/585
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 00:54:02 +01:00
Linus Mårtensson
5e4e8ec429 build: add android support
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.
2013-06-17 17:21:56 +02:00