Merge pull request #7505 from thunder-coding/nodejs
nodejs: Bump to 16.x
This commit is contained in:
commit
d6a3de3d20
@ -1,20 +1,20 @@
|
||||
diff -uNr node-v13.0.0/deps/uv/src/unix/fs.c node-v13.0.0.mod/deps/uv/src/unix/fs.c
|
||||
--- node-v13.0.0/deps/uv/src/unix/fs.c 2019-10-22 17:23:28.000000000 +0300
|
||||
+++ node-v13.0.0.mod/deps/uv/src/unix/fs.c 2020-01-16 02:27:44.944603915 +0200
|
||||
@@ -1048,6 +1048,7 @@
|
||||
goto out;
|
||||
|
||||
diff -uNr ./deps/uv/src/unix/fs.c ./deps/uv/src/unix/fs.c.mod
|
||||
--- ./deps/uv/src/unix/fs.c 2021-06-03 07:15:30.000000000 +0530
|
||||
+++ ./deps/uv/src/unix/fs.c.mod 2021-06-18 20:05:49.675642773 +0530
|
||||
@@ -1247,6 +1247,7 @@
|
||||
#endif /* !__linux__ */
|
||||
}
|
||||
|
||||
+#ifndef __ANDROID__
|
||||
#ifdef FICLONE
|
||||
if (req->flags & UV_FS_COPYFILE_FICLONE ||
|
||||
req->flags & UV_FS_COPYFILE_FICLONE_FORCE) {
|
||||
@@ -1072,7 +1073,7 @@
|
||||
@@ -1267,6 +1268,7 @@
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
-
|
||||
+#endif
|
||||
|
||||
bytes_to_send = src_statsbuf.st_size;
|
||||
in_offset = 0;
|
||||
while (bytes_to_send != 0) {
|
||||
|
@ -1,13 +1,12 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://nodejs.org/
|
||||
TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
|
||||
TERMUX_PKG_DESCRIPTION="Open Source, cross-platform JavaScript runtime environment"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
|
||||
# Note: package build may fail on Github Actions CI due to out-of-memory
|
||||
# condition. It should be built locally instead.
|
||||
TERMUX_PKG_VERSION=14.15.4
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_VERSION=16.9.1
|
||||
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=adb7ecf66c74b52a14a08cc22bb0f9aedc157cac1ac93240f7f455e8c8edec9c
|
||||
TERMUX_PKG_SHA256=97f50ec53c050e7ac97bdbe5586aaca380dd23064064c85a1f2017a35244131c
|
||||
# Note that we do not use a shared libuv to avoid an issue with the Android
|
||||
# linker, which does not use symbols of linked shared libraries when resolving
|
||||
# symbols on dlopen(). See https://github.com/termux/termux-packages/issues/462.
|
||||
@ -66,6 +65,7 @@ termux_step_configure() {
|
||||
DEST_CPU="arm"
|
||||
elif [ $TERMUX_ARCH = "i686" ]; then
|
||||
DEST_CPU="ia32"
|
||||
LDFLAGS+=" -u __atomic_fetch_add_8 -u __atomic_load_8 -u __atomic_compare_exchange_8 -latomic"
|
||||
elif [ $TERMUX_ARCH = "aarch64" ]; then
|
||||
DEST_CPU="arm64"
|
||||
elif [ $TERMUX_ARCH = "x86_64" ]; then
|
||||
@ -77,8 +77,9 @@ termux_step_configure() {
|
||||
export GYP_DEFINES="host_os=linux"
|
||||
export CC_host=gcc
|
||||
export CXX_host=g++
|
||||
export LINK_host=g++
|
||||
export LINK_host="g++ -Wl,--no-as-needed -ldl -lz"
|
||||
|
||||
LDFLAGS+=" -ldl"
|
||||
# See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
|
||||
./configure \
|
||||
--prefix=$TERMUX_PREFIX \
|
||||
|
@ -1,13 +1,11 @@
|
||||
diff -uNr node-v8.4.0/deps/uv/src/unix/core.c node-v8.4.0.mod/deps/uv/src/unix/core.c
|
||||
--- node-v8.4.0/deps/uv/src/unix/core.c 2017-08-15 19:42:28.000000000 +0300
|
||||
+++ node-v8.4.0.mod/deps/uv/src/unix/core.c 2017-09-14 16:13:27.292856099 +0300
|
||||
@@ -1112,7 +1112,9 @@
|
||||
diff -uNr ./deps/uv/src/unix/core.c ./deps/uv/src/unix/core.c.mod
|
||||
--- ./deps/uv/src/unix/core.c 2021-06-03 07:15:30.000000000 +0530
|
||||
+++ ./deps/uv/src/unix/core.c.mod 2021-06-18 20:10:13.705642672 +0530
|
||||
@@ -1116,7 +1116,7 @@
|
||||
|
||||
/* No temp environment variables defined */
|
||||
#if defined(__ANDROID__)
|
||||
- buf = "/data/local/tmp";
|
||||
+ // Don't use '/data/local/tmp' in Termux
|
||||
+ //buf = "/data/local/tmp";
|
||||
+ buf = "@TERMUX_PREFIX@/tmp";
|
||||
#else
|
||||
buf = "/tmp";
|
||||
|
@ -1,9 +1,8 @@
|
||||
diff -uNr node-v12.10.0/deps/uv/src/unix/process.c node-v12.10.0.mod/deps/uv/src/unix/process.c
|
||||
--- node-v12.10.0/deps/uv/src/unix/process.c 2019-09-04 18:36:23.000000000 +0300
|
||||
+++ node-v12.10.0.mod/deps/uv/src/unix/process.c 2019-09-23 01:39:39.069030779 +0300
|
||||
@@ -351,27 +351,6 @@
|
||||
_exit(127);
|
||||
}
|
||||
--- ./deps/uv/src/unix/process.c 2021-09-10 22:55:12.000000000 +0530
|
||||
+++ ./deps/uv/src/unix/process.c.mod 2021-09-11 10:27:22.239600280 +0530
|
||||
@@ -283,23 +283,6 @@
|
||||
if (options->cwd != NULL && chdir(options->cwd))
|
||||
uv__write_errno(error_fd);
|
||||
|
||||
- if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) {
|
||||
- /* When dropping privileges from root, the `setgroups` call will
|
||||
@ -16,15 +15,11 @@ diff -uNr node-v12.10.0/deps/uv/src/unix/process.c node-v12.10.0.mod/deps/uv/src
|
||||
- SAVE_ERRNO(setgroups(0, NULL));
|
||||
- }
|
||||
-
|
||||
- if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid)) {
|
||||
- uv__write_int(error_fd, UV__ERR(errno));
|
||||
- _exit(127);
|
||||
- }
|
||||
- if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid))
|
||||
- uv__write_errno(error_fd);
|
||||
-
|
||||
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) {
|
||||
- uv__write_int(error_fd, UV__ERR(errno));
|
||||
- _exit(127);
|
||||
- }
|
||||
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid))
|
||||
- uv__write_errno(error_fd);
|
||||
-
|
||||
if (options->env != NULL) {
|
||||
environ = options->env;
|
||||
|
@ -1,7 +1,6 @@
|
||||
diff -u -r ../node-v9.7.1/deps/uv/uv.gyp ./deps/uv/uv.gyp
|
||||
--- ../node-v9.7.1/deps/uv/uv.gyp 2018-03-02 01:58:02.000000000 +0000
|
||||
+++ ./deps/uv/uv.gyp 2018-03-05 10:51:15.530165566 +0000
|
||||
@@ -39,7 +39,7 @@
|
||||
--- ./deps/uv/uv.gyp 2021-09-12 08:37:13.451586303 +0530
|
||||
+++ ./deps/uv/uv.gyp.mod 2021-09-12 08:37:58.344924108 +0530
|
||||
@@ -40,7 +40,7 @@
|
||||
{
|
||||
'target_name': 'libuv',
|
||||
'type': '<(uv_library)',
|
||||
@ -10,7 +9,7 @@ diff -u -r ../node-v9.7.1/deps/uv/uv.gyp ./deps/uv/uv.gyp
|
||||
'include',
|
||||
'src/',
|
||||
],
|
||||
@@ -54,7 +54,7 @@
|
||||
@@ -55,7 +55,7 @@
|
||||
'<@(shared_unix_defines)',
|
||||
'<@(shared_zos_defines)',
|
||||
],
|
||||
@ -19,3 +18,11 @@ diff -u -r ../node-v9.7.1/deps/uv/uv.gyp ./deps/uv/uv.gyp
|
||||
'conditions': [
|
||||
['OS == "linux"', {
|
||||
'defines': [ '_POSIX_C_SOURCE=200112' ],
|
||||
@@ -262,6 +262,7 @@
|
||||
'src/unix/procfs-exepath.c',
|
||||
'src/unix/random-getrandom.c',
|
||||
'src/unix/random-sysctl-linux.c',
|
||||
+ 'src/unix/epoll.c',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [ '-ldl' ],
|
||||
|
@ -1,7 +1,6 @@
|
||||
diff -u -r ../node-v14.0.0/deps/v8/src/flags/flag-definitions.h ./deps/v8/src/flags/flag-definitions.h
|
||||
--- ../node-v14.0.0/deps/v8/src/flags/flag-definitions.h 2020-04-21 11:38:50.000000000 +0000
|
||||
+++ ./deps/v8/src/flags/flag-definitions.h 2020-04-28 23:22:24.894254000 +0000
|
||||
@@ -1555,7 +1555,7 @@
|
||||
--- ./deps/v8/src/flags/flag-definitions.h 2021-06-03 07:15:31.000000000 +0530
|
||||
+++ ./deps/v8/src/flags/flag-definitions.h.mod 2021-06-18 20:24:38.915642342 +0530
|
||||
@@ -1842,7 +1842,7 @@
|
||||
#undef DEFINE_PERF_PROF_BOOL
|
||||
#undef DEFINE_PERF_PROF_IMPLICATION
|
||||
|
||||
|
@ -0,0 +1,58 @@
|
||||
--- ./deps/v8/src/heap/base/asm/x64/push_registers_asm.cc 2021-09-10 22:55:12.000000000 +0530
|
||||
+++ ./deps/v8/src/heap/base/asm/x64/push_registers_asm.cc.mod 2021-09-12 16:03:58.444141027 +0530
|
||||
@@ -16,12 +16,15 @@
|
||||
// GN toolchain (e.g. ChromeOS) and not provide them.
|
||||
// _WIN64 Defined as 1 when the compilation target is 64-bit ARM or x64.
|
||||
// Otherwise, undefined.
|
||||
+
|
||||
+#if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_X64)
|
||||
#ifdef _WIN64
|
||||
|
||||
// We maintain 16-byte alignment at calls. There is an 8-byte return address
|
||||
// on the stack and we push 232 bytes which maintains 16-byte stack alignment
|
||||
// at the call.
|
||||
// Source: https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention
|
||||
+
|
||||
asm(".globl PushAllRegistersAndIterateStack \n"
|
||||
"PushAllRegistersAndIterateStack: \n"
|
||||
// rbp is callee-saved. Maintain proper frame pointer for debugging.
|
||||
@@ -104,3 +107,39 @@
|
||||
" ret \n");
|
||||
|
||||
#endif // !_WIN64
|
||||
+#else
|
||||
+asm(
|
||||
+#ifdef _WIN32
|
||||
+ ".globl _PushAllRegistersAndIterateStack \n"
|
||||
+ "_PushAllRegistersAndIterateStack: \n"
|
||||
+#else // !_WIN32
|
||||
+ ".globl PushAllRegistersAndIterateStack \n"
|
||||
+ ".type PushAllRegistersAndIterateStack, %function \n"
|
||||
+ ".hidden PushAllRegistersAndIterateStack \n"
|
||||
+ "PushAllRegistersAndIterateStack: \n"
|
||||
+#endif // !_WIN32
|
||||
+ // [ IterateStackCallback ]
|
||||
+ // [ StackVisitor* ]
|
||||
+ // [ Stack* ]
|
||||
+ // [ ret ]
|
||||
+ // ebp is callee-saved. Maintain proper frame pointer for debugging.
|
||||
+ " push %ebp \n"
|
||||
+ " movl %esp, %ebp \n"
|
||||
+ " push %ebx \n"
|
||||
+ " push %esi \n"
|
||||
+ " push %edi \n"
|
||||
+ // Save 3rd parameter (IterateStackCallback).
|
||||
+ " movl 28(%esp), %ecx \n"
|
||||
+ // Pass 3rd parameter as esp (stack pointer).
|
||||
+ " push %esp \n"
|
||||
+ // Pass 2nd parameter (StackVisitor*).
|
||||
+ " push 28(%esp) \n"
|
||||
+ // Pass 1st parameter (Stack*).
|
||||
+ " push 28(%esp) \n"
|
||||
+ " call *%ecx \n"
|
||||
+ // Pop the callee-saved registers.
|
||||
+ " addl $24, %esp \n"
|
||||
+ // Restore rbp as it was used as frame pointer.
|
||||
+ " pop %ebp \n"
|
||||
+ " ret \n");
|
||||
+#endif
|
@ -1,7 +1,6 @@
|
||||
diff -u -r ../node-v12.9.0/deps/v8/src/logging/log.cc ./deps/v8/src/logging/log.cc
|
||||
--- ../node-v12.9.0/deps/v8/src/logging/log.cc 2019-08-20 17:14:50.000000000 +0000
|
||||
+++ ./deps/v8/src/logging/log.cc 2019-08-24 22:39:52.426124955 +0000
|
||||
@@ -280,7 +280,7 @@
|
||||
--- ./deps/v8/src/logging/log.cc 2021-06-03 07:15:31.000000000 +0530
|
||||
+++ ./deps/v8/src/logging/log.cc.mod 2021-06-18 20:27:34.605642275 +0530
|
||||
@@ -291,7 +291,7 @@
|
||||
FILE* perf_output_handle_;
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
diff -uNr node-v12.3.1/deps/uv/src/unix/sysinfo-memory.c node-v12.3.1.mod/deps/uv/src/unix/sysinfo-memory.c
|
||||
--- node-v12.3.1/deps/uv/src/unix/sysinfo-memory.c 2019-05-22 15:21:52.000000000 +0300
|
||||
+++ node-v12.3.1.mod/deps/uv/src/unix/sysinfo-memory.c 2019-05-28 15:37:28.698418026 +0300
|
||||
--- ./deps/uv/src/unix/sysinfo-memory.c 2021-06-03 07:15:30.000000000 +0530
|
||||
+++ ./deps/uv/src/unix/sysinfo-memory.c.mod 2021-06-18 20:31:00.255642197 +0530
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/sysinfo.h>
|
||||
@ -9,8 +8,11 @@ diff -uNr node-v12.3.1/deps/uv/src/unix/sysinfo-memory.c node-v12.3.1.mod/deps/u
|
||||
uint64_t uv_get_free_memory(void) {
|
||||
struct sysinfo info;
|
||||
|
||||
@@ -40,3 +41,4 @@
|
||||
return (uint64_t) info.totalram * info.mem_unit;
|
||||
@@ -32,6 +33,7 @@
|
||||
return (uint64_t) info.freeram * info.mem_unit;
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
uint64_t uv_get_total_memory(void) {
|
||||
struct sysinfo info;
|
||||
|
@ -1,7 +1,6 @@
|
||||
diff -u -r ../node-v6.2.0/lib/child_process.js ./lib/child_process.js
|
||||
--- ../node-v6.2.0/lib/child_process.js 2016-05-17 15:53:06.000000000 -0400
|
||||
+++ ./lib/child_process.js 2016-05-18 16:31:45.574685443 -0400
|
||||
@@ -335,7 +335,7 @@
|
||||
--- ./lib/child_process.js 2021-06-03 07:15:32.000000000 +0530
|
||||
+++ ./lib/child_process.js.mod 2021-06-18 20:32:47.215642156 +0530
|
||||
@@ -520,7 +520,7 @@
|
||||
if (typeof options.shell === 'string')
|
||||
file = options.shell;
|
||||
else if (process.platform === 'android')
|
||||
|
@ -1,12 +1,11 @@
|
||||
diff -u -r ../node-v10.9.0/lib/os.js ./lib/os.js
|
||||
--- ../node-v10.9.0/lib/os.js 2018-08-15 13:53:34.000000000 +0000
|
||||
+++ ./lib/os.js 2018-08-23 20:42:39.611186774 +0000
|
||||
@@ -130,7 +130,7 @@
|
||||
--- ./lib/os.js 2021-06-03 07:15:32.000000000 +0530
|
||||
+++ ./lib/os.js.mod 2021-06-18 20:34:28.215642118 +0530
|
||||
@@ -183,7 +183,7 @@
|
||||
path = safeGetenv('TMPDIR') ||
|
||||
safeGetenv('TMP') ||
|
||||
safeGetenv('TEMP') ||
|
||||
- '/tmp';
|
||||
+ '@TERMUX_PREFIX@/tmp';
|
||||
if (path.length > 1 && path.endsWith('/'))
|
||||
path = path.slice(0, -1);
|
||||
if (path.length > 1 && StringPrototypeEndsWith(path, '/'))
|
||||
path = StringPrototypeSlice(path, 0, -1);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
diff -uNr node-v14.0.0/deps/v8/BUILD.gn node-v14.0.0.mod/deps/v8/BUILD.gn
|
||||
--- node-v14.0.0/deps/v8/BUILD.gn 2020-04-21 11:38:50.000000000 +0000
|
||||
+++ node-v14.0.0.mod/deps/v8/BUILD.gn 2020-05-07 14:11:12.247429516 +0000
|
||||
--- ./deps/v8/BUILD.gn 2021-06-03 07:15:30.000000000 +0530
|
||||
+++ ./deps/v8/BUILD.gn.mod 2021-06-18 20:42:14.845641940 +0530
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
declare_args() {
|
||||
@ -10,27 +9,3 @@ diff -uNr node-v14.0.0/deps/v8/BUILD.gn node-v14.0.0.mod/deps/v8/BUILD.gn
|
||||
|
||||
# Dynamically set an additional dependency from v8/custom_deps.
|
||||
v8_custom_deps = ""
|
||||
diff -uNr node-v14.0.0/deps/v8/infra/mb/mb_config.pyl node-v14.0.0.mod/deps/v8/infra/mb/mb_config.pyl
|
||||
--- node-v14.0.0/deps/v8/infra/mb/mb_config.pyl 2020-04-21 11:38:50.000000000 +0000
|
||||
+++ node-v14.0.0.mod/deps/v8/infra/mb/mb_config.pyl 2020-05-07 14:12:44.653746359 +0000
|
||||
@@ -565,7 +565,7 @@
|
||||
|
||||
'mixins': {
|
||||
'android': {
|
||||
- 'gn_args': 'target_os="android" v8_android_log_stdout=true',
|
||||
+ 'gn_args': 'target_os="android" v8_android_log_stdout=false',
|
||||
},
|
||||
|
||||
'android_strip_outputs': {
|
||||
diff -uNr node-v14.0.0/src/debug_utils.cc node-v14.0.0.mod/src/debug_utils.cc
|
||||
--- node-v14.0.0/src/debug_utils.cc 2020-04-21 11:38:51.000000000 +0000
|
||||
+++ node-v14.0.0.mod/src/debug_utils.cc 2020-05-07 14:12:00.694741330 +0000
|
||||
@@ -500,7 +500,7 @@
|
||||
|
||||
WriteConsoleW(handle, wbuf.data(), n, nullptr, nullptr);
|
||||
return;
|
||||
-#elif defined(__ANDROID__)
|
||||
+#elif defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
if (file == stderr) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "nodejs", "%s", str.data());
|
||||
return;
|
||||
|
@ -1,6 +1,14 @@
|
||||
--- ./node.gyp.orig 2020-10-17 18:07:04.114992036 +0000
|
||||
+++ ./node.gyp 2020-10-17 18:30:04.575629963 +0000
|
||||
@@ -1201,101 +1201,6 @@
|
||||
--- ./node.gyp.orig 2021-09-13 15:57:45.411848965 +0530
|
||||
+++ ./node.gyp 2021-09-13 15:58:53.811848939 +0530
|
||||
@@ -340,6 +340,7 @@
|
||||
|
||||
'include_dirs': [
|
||||
'src',
|
||||
+ 'deps/cares/src/lib',
|
||||
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
|
||||
],
|
||||
'dependencies': [
|
||||
@@ -1061,162 +1062,6 @@
|
||||
}],
|
||||
],
|
||||
}, # fuzz_env
|
||||
@ -10,6 +18,8 @@
|
||||
-
|
||||
- 'dependencies': [
|
||||
- '<(node_lib_target_name)',
|
||||
- 'deps/googletest/googletest.gyp:gtest',
|
||||
- 'deps/googletest/googletest.gyp:gtest_main',
|
||||
- 'deps/histogram/histogram.gyp:histogram',
|
||||
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
- 'node_dtrace_header',
|
||||
@ -40,8 +50,6 @@
|
||||
- 'sources': [
|
||||
- 'src/node_snapshot_stub.cc',
|
||||
- 'src/node_code_cache_stub.cc',
|
||||
- 'test/cctest/gtest/gtest-all.cc',
|
||||
- 'test/cctest/gtest/gtest_main.cc',
|
||||
- 'test/cctest/node_test_fixture.cc',
|
||||
- 'test/cctest/node_test_fixture.h',
|
||||
- 'test/cctest/test_aliased_buffer.cc',
|
||||
@ -49,7 +57,9 @@
|
||||
- 'test/cctest/test_base_object_ptr.cc',
|
||||
- 'test/cctest/test_node_postmortem_metadata.cc',
|
||||
- 'test/cctest/test_environment.cc',
|
||||
- 'test/cctest/test_js_native_api_v8.cc',
|
||||
- 'test/cctest/test_linked_binding.cc',
|
||||
- 'test/cctest/test_node_api.cc',
|
||||
- 'test/cctest/test_per_process.cc',
|
||||
- 'test/cctest/test_platform.cc',
|
||||
- 'test/cctest/test_json_utils.cc',
|
||||
@ -64,6 +74,9 @@
|
||||
- 'defines': [
|
||||
- 'HAVE_OPENSSL=1',
|
||||
- ],
|
||||
- 'sources': [
|
||||
- 'test/cctest/test_node_crypto.cc',
|
||||
- ]
|
||||
- }],
|
||||
- ['v8_enable_inspector==1', {
|
||||
- 'sources': [
|
||||
@ -99,6 +112,125 @@
|
||||
- }],
|
||||
- ],
|
||||
- }, # cctest
|
||||
-
|
||||
- {
|
||||
- 'target_name': 'embedtest',
|
||||
- 'type': 'executable',
|
||||
-
|
||||
- 'dependencies': [
|
||||
- '<(node_lib_target_name)',
|
||||
- 'deps/histogram/histogram.gyp:histogram',
|
||||
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
- 'node_dtrace_header',
|
||||
- 'node_dtrace_ustack',
|
||||
- 'node_dtrace_provider',
|
||||
- ],
|
||||
-
|
||||
- 'includes': [
|
||||
- 'node.gypi'
|
||||
- ],
|
||||
-
|
||||
- 'include_dirs': [
|
||||
- 'src',
|
||||
- 'tools/msvs/genfiles',
|
||||
- 'deps/v8/include',
|
||||
- 'deps/cares/include',
|
||||
- 'deps/uv/include',
|
||||
- 'deps/uvwasi/include',
|
||||
- 'test/embedding',
|
||||
- ],
|
||||
-
|
||||
- 'sources': [
|
||||
- 'src/node_snapshot_stub.cc',
|
||||
- 'src/node_code_cache_stub.cc',
|
||||
- 'test/embedding/embedtest.cc',
|
||||
- ],
|
||||
-
|
||||
- 'conditions': [
|
||||
- ['OS=="solaris"', {
|
||||
- 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
|
||||
- }],
|
||||
- # Skip cctest while building shared lib node for Windows
|
||||
- [ 'OS=="win" and node_shared=="true"', {
|
||||
- 'type': 'none',
|
||||
- }],
|
||||
- [ 'node_shared=="true"', {
|
||||
- 'xcode_settings': {
|
||||
- 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
|
||||
- },
|
||||
- }],
|
||||
- ['OS=="win"', {
|
||||
- 'libraries': [
|
||||
- 'Dbghelp.lib',
|
||||
- 'winmm.lib',
|
||||
- 'Ws2_32.lib',
|
||||
- ],
|
||||
- }],
|
||||
- ],
|
||||
- }, # embedtest
|
||||
|
||||
{
|
||||
'target_name': 'embedtest',
|
||||
'target_name': 'overlapped-checker',
|
||||
@@ -1295,59 +1140,13 @@
|
||||
'Ws2_32.lib',
|
||||
],
|
||||
}],
|
||||
- ],
|
||||
- }, # mkcodecache
|
||||
- {
|
||||
- 'target_name': 'node_mksnapshot',
|
||||
- 'type': 'executable',
|
||||
-
|
||||
- 'dependencies': [
|
||||
- '<(node_lib_target_name)',
|
||||
- 'deps/histogram/histogram.gyp:histogram',
|
||||
- 'deps/uvwasi/uvwasi.gyp:uvwasi',
|
||||
- ],
|
||||
-
|
||||
- 'includes': [
|
||||
- 'node.gypi'
|
||||
- ],
|
||||
-
|
||||
- 'include_dirs': [
|
||||
- 'src',
|
||||
- 'tools/msvs/genfiles',
|
||||
- 'deps/v8/include',
|
||||
- 'deps/cares/include',
|
||||
- 'deps/uv/include',
|
||||
- 'deps/uvwasi/include',
|
||||
- ],
|
||||
-
|
||||
- 'defines': [ 'NODE_WANT_INTERNALS=1' ],
|
||||
-
|
||||
- 'sources': [
|
||||
- 'src/node_snapshot_stub.cc',
|
||||
- 'src/node_code_cache_stub.cc',
|
||||
- 'tools/snapshot/node_mksnapshot.cc',
|
||||
- ],
|
||||
-
|
||||
- 'conditions': [
|
||||
- [ 'node_use_openssl=="true"', {
|
||||
- 'defines': [
|
||||
- 'HAVE_OPENSSL=1',
|
||||
- ],
|
||||
- }],
|
||||
- ['v8_enable_inspector==1', {
|
||||
- 'defines': [
|
||||
- 'HAVE_INSPECTOR=1',
|
||||
- ],
|
||||
- }],
|
||||
- ['OS=="win"', {
|
||||
+ ['target_arch=="ia32"', {
|
||||
'libraries': [
|
||||
- 'Dbghelp.lib',
|
||||
- 'winmm.lib',
|
||||
- 'Ws2_32.lib',
|
||||
+ '-latomic',
|
||||
],
|
||||
}],
|
||||
],
|
||||
- }, # node_mksnapshot
|
||||
+ }, # mkcodecache
|
||||
], # end targets
|
||||
|
||||
'conditions': [
|
||||
|
@ -1,29 +0,0 @@
|
||||
--- ../node/deps/npm/node_modules/cacache/lib/util/move-file.js 2017-10-22 19:30:25.778456404 +0200
|
||||
+++ ./deps/npm/node_modules/cacache/lib/util/move-file.js 2017-10-22 20:41:18.021337095 +0200
|
||||
@@ -4,6 +4,7 @@
|
||||
const BB = require('bluebird')
|
||||
const chmod = BB.promisify(fs.chmod)
|
||||
const unlink = BB.promisify(fs.unlink)
|
||||
+const access = BB.promisify(fs.access)
|
||||
let move
|
||||
let pinflight
|
||||
|
||||
@@ -18,6 +19,18 @@
|
||||
// content their own way.
|
||||
//
|
||||
// Note that, as the name suggests, this strictly only supports file moves.
|
||||
+
|
||||
+
|
||||
+ // Calling link() on android is not allowed, we get a SELinux security exception
|
||||
+ if(process.platform === 'android') {
|
||||
+ return access(dest, fs.constants.F_OK)
|
||||
+ .catch(err => {
|
||||
+ if (!move) { move = require('move-concurrently') }
|
||||
+ return move(src, dest, { BB, fs })
|
||||
+ .then(() => chmod(dest, '0444'))
|
||||
+ })
|
||||
+ }
|
||||
+
|
||||
return BB.fromNode(cb => {
|
||||
fs.link(src, dest, err => {
|
||||
if (err) {
|
@ -1,12 +0,0 @@
|
||||
diff -u -r ../node-v6.0.0/src/cares_wrap.cc ./src/cares_wrap.cc
|
||||
--- ../node-v6.0.0/src/cares_wrap.cc 2016-04-26 15:50:22.000000000 -0400
|
||||
+++ ./src/cares_wrap.cc 2016-05-02 00:24:26.349502775 -0400
|
||||
@@ -15,8 +15,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#if defined(__ANDROID__) || \
|
||||
- defined(__MINGW32__) || \
|
||||
+#if defined(__MINGW32__) || \
|
||||
defined(__OpenBSD__) || \
|
||||
defined(_MSC_VER)
|
@ -1,7 +1,6 @@
|
||||
diff -u -r ../node-v11.7.0/src/node_internals.h ./src/node_internals.h
|
||||
--- ../node-v11.7.0/src/node_internals.h 2019-01-17 21:27:16.000000000 +0000
|
||||
+++ ./src/node_internals.h 2019-01-18 22:44:06.207542176 +0000
|
||||
@@ -358,7 +358,7 @@
|
||||
--- ./src/node_internals.h 2021-06-03 07:15:32.000000000 +0530
|
||||
+++ ./src/node_internals.h.mod 2021-06-18 20:49:41.375641769 +0530
|
||||
@@ -286,7 +286,7 @@
|
||||
|
||||
// Functions defined in node.cc that are exposed via the bootstrapper object
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
diff -u -r ../node-v6.3.1/src/node_main.cc ./src/node_main.cc
|
||||
--- ../node-v6.3.1/src/node_main.cc 2016-07-21 16:44:43.000000000 -0400
|
||||
+++ ./src/node_main.cc 2016-07-23 13:53:57.530095071 -0400
|
||||
@@ -54,6 +54,10 @@
|
||||
--- ./src/node_main.cc 2021-06-03 07:15:32.000000000 +0530
|
||||
+++ ./src/node_main.cc.mod 2021-06-18 21:13:57.512327727 +0530
|
||||
@@ -124,6 +124,10 @@
|
||||
// calls elsewhere in the program (e.g., any logging from V8.)
|
||||
setvbuf(stdout, nullptr, _IONBF, 0);
|
||||
setvbuf(stderr, nullptr, _IONBF, 0);
|
||||
+ if (getenv("TMPDIR") == NULL) {
|
||||
+ if(getenv("TMPDIR") == NULL) {
|
||||
+ // Give javascript programs (such as updated versions of npm) a working tmpdir.
|
||||
+ putenv("TMPDIR=@TERMUX_PREFIX@/tmp");
|
||||
+ }
|
||||
|
@ -1,11 +1,10 @@
|
||||
diff -u -r ../node-v12.9.0/tools/v8_gypfiles/v8.gyp ./tools/v8_gypfiles/v8.gyp
|
||||
--- ../node-v12.9.0/tools/v8_gypfiles/v8.gyp 2019-08-20 17:14:53.000000000 +0000
|
||||
+++ ./tools/v8_gypfiles/v8.gyp 2019-08-24 22:02:57.943558855 +0000
|
||||
@@ -1010,6 +1010,7 @@
|
||||
--- ./tools/v8_gypfiles/v8.gyp 2021-06-03 07:15:33.000000000 +0530
|
||||
+++ ./tools/v8_gypfiles/v8.gyp.mod 2021-06-18 21:18:09.722327631 +0530
|
||||
@@ -928,6 +928,7 @@
|
||||
'<(V8_ROOT)/src/base/platform/platform-posix.h',
|
||||
'<(V8_ROOT)/src/base/platform/platform-posix-time.cc',
|
||||
'<(V8_ROOT)/src/base/platform/platform-posix-time.h',
|
||||
+ '<(V8_ROOT)/src/base/platform/platform-linux.cc',
|
||||
+ '<(V8_ROOT)/src/base/platform/platform-linux.h',
|
||||
],
|
||||
'conditions': [
|
||||
['_toolset=="host"', {
|
||||
'link_settings': {
|
||||
'target_conditions': [
|
||||
|
@ -1,75 +0,0 @@
|
||||
diff -uNr ./deps/v8/src/objects/js-list-format.cc ./deps/v8/src/objects/js-list-format.cc.mod
|
||||
--- ./deps/v8/src/objects/js-list-format.cc 2021-06-16 14:17:02.740441957 +0530
|
||||
+++ ./deps/v8/src/objects/js-list-format.cc.mod 2021-06-16 14:14:03.766819789 +0530
|
||||
@@ -29,46 +29,27 @@
|
||||
namespace internal {
|
||||
|
||||
namespace {
|
||||
-const char* kStandard = "standard";
|
||||
-const char* kOr = "or";
|
||||
-const char* kUnit = "unit";
|
||||
-const char* kStandardShort = "standard-short";
|
||||
-const char* kOrShort = "or-short";
|
||||
-const char* kUnitShort = "unit-short";
|
||||
-const char* kStandardNarrow = "standard-narrow";
|
||||
-const char* kOrNarrow = "or-narrow";
|
||||
-const char* kUnitNarrow = "unit-narrow";
|
||||
|
||||
-const char* GetIcuStyleString(JSListFormat::Style style,
|
||||
- JSListFormat::Type type) {
|
||||
+UListFormatterWidth GetIcuWidth(JSListFormat::Style style) {
|
||||
+ switch (style) {
|
||||
+ case JSListFormat::Style::LONG:
|
||||
+ return ULISTFMT_WIDTH_WIDE;
|
||||
+ case JSListFormat::Style::SHORT:
|
||||
+ return ULISTFMT_WIDTH_SHORT;
|
||||
+ case JSListFormat::Style::NARROW:
|
||||
+ return ULISTFMT_WIDTH_NARROW;
|
||||
+ }
|
||||
+ UNREACHABLE();
|
||||
+}
|
||||
+
|
||||
+UListFormatterType GetIcuType(JSListFormat::Type type) {
|
||||
switch (type) {
|
||||
case JSListFormat::Type::CONJUNCTION:
|
||||
- switch (style) {
|
||||
- case JSListFormat::Style::LONG:
|
||||
- return kStandard;
|
||||
- case JSListFormat::Style::SHORT:
|
||||
- return kStandardShort;
|
||||
- case JSListFormat::Style::NARROW:
|
||||
- return kStandardNarrow;
|
||||
- }
|
||||
+ return ULISTFMT_TYPE_AND;
|
||||
case JSListFormat::Type::DISJUNCTION:
|
||||
- switch (style) {
|
||||
- case JSListFormat::Style::LONG:
|
||||
- return kOr;
|
||||
- case JSListFormat::Style::SHORT:
|
||||
- return kOrShort;
|
||||
- case JSListFormat::Style::NARROW:
|
||||
- return kOrNarrow;
|
||||
- }
|
||||
+ return ULISTFMT_TYPE_OR;
|
||||
case JSListFormat::Type::UNIT:
|
||||
- switch (style) {
|
||||
- case JSListFormat::Style::LONG:
|
||||
- return kUnit;
|
||||
- case JSListFormat::Style::SHORT:
|
||||
- return kUnitShort;
|
||||
- case JSListFormat::Style::NARROW:
|
||||
- return kUnitNarrow;
|
||||
- }
|
||||
+ return ULISTFMT_TYPE_UNITS;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
@@ -143,7 +124,7 @@
|
||||
icu::Locale icu_locale = r.icu_locale;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
icu::ListFormatter* formatter = icu::ListFormatter::createInstance(
|
||||
- icu_locale, GetIcuStyleString(style_enum, type_enum), status);
|
||||
+ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status);
|
||||
if (U_FAILURE(status) || formatter == nullptr) {
|
||||
delete formatter;
|
||||
THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError),
|
Loading…
Reference in New Issue
Block a user