chore: bump node to v20.12.2 (main) (#41710)

* chore: bump node in DEPS to v20.12.0

* chore: update build_add_gn_build_files.patch

* chore: update patches

* chore: bump node in DEPS to v20.12.1

* chore: update patches

* build: encode non-ASCII Latin1 characters as one byte in JS2C

https://github.com/nodejs/node/pull/51605

* crypto: use EVP_MD_fetch and cache EVP_MD for hashes

https://github.com/nodejs/node/pull/51034

* chore: update filenames.json

* chore: bump node in DEPS to v20.12.2

* chore: update patches

* src: support configurable snapshot

https://github.com/nodejs/node/pull/50453

* test: remove test-domain-error-types flaky designation

https://github.com/nodejs/node/pull/51717

* src: avoid draining platform tasks at FreeEnvironment

https://github.com/nodejs/node/pull/51290

* chore: fix accidentally deleted v8 dep

* lib: define FormData and fetch etc. in the built-in snapshot

https://github.com/nodejs/node/pull/51598

* chore: rebase on main

* chore: remove stray log

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Cheng <zcbenz@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
electron-roller[bot] 2024-04-17 12:39:13 -04:00 committed by GitHub
parent b118c70f77
commit 7120c58297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 371 additions and 774 deletions

View file

@ -11,10 +11,10 @@ really in 20/21. We have to wait until 22 is released to be able to
build with upstream GN files.
diff --git a/BUILD.gn b/BUILD.gn
index 1ed186b597eece7c34cb69c8e1e20870555a040d..541e7d2b8ee05677b64a3ea39c1422560fd5df75 100644
index 1ed186b597eece7c34cb69c8e1e20870555a040d..7d201bb6b822f0401c3be2bc52d65bc71463748b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1,14 +1,404 @@
@@ -1,14 +1,406 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
@ -258,9 +258,11 @@ index 1ed186b597eece7c34cb69c8e1e20870555a040d..541e7d2b8ee05677b64a3ea39c142256
+ defines = []
+ sources = [
+ "tools/js2c.cc",
+ "tools/executable_wrapper.h"
+ "tools/executable_wrapper.h",
+ "src/embedded_data.cc",
+ "src/embedded_data.h",
+ ]
+ include_dirs = [ "tools" ]
+ include_dirs = [ "tools", "src" ]
+ deps = [
+ "deps/simdutf($electron_js2c_toolchain)",
+ "deps/uv($electron_js2c_toolchain)",
@ -457,88 +459,88 @@ index e92ac3a3beac143dced2efb05304ed8ba832b067..1ce69e9deba1a9b191e8d95f4c82e0ec
+ public_configs = [ ":ada_config" ]
}
diff --git a/deps/base64/unofficial.gni b/deps/base64/unofficial.gni
index 269c62d976d6adea6d020568094e23e9b0a9dc7c..14ffff0b4badb7ad71f2b6df43ad2eb300fc55ed 100644
index 0e69d7383762f6b81c5b57698aa9d121d5a9c401..35bbeb37acc7ccb14b4b8a644ec3d4c76ca5c61c 100644
--- a/deps/base64/unofficial.gni
+++ b/deps/base64/unofficial.gni
@@ -18,6 +18,10 @@ template("base64_gn_build") {
@@ -12,6 +12,10 @@ template("base64_gn_build") {
}
}
+ # FIXME(zcbenz): ASM on win/x86 compiles perfectly in upstream Node, figure
+ # out why it does not work in Electron's build configs.
+ support_x86_asm = target_cpu == "x64" || (target_cpu == "x86" && !is_win)
+ support_x86_asm = current_cpu == "x64" || (current_cpu == "x86" && !is_win)
+
config("base64_internal_config") {
include_dirs = [ "base64/lib" ]
if (is_component_build) {
@@ -25,7 +29,7 @@ template("base64_gn_build") {
@@ -19,7 +23,7 @@ template("base64_gn_build") {
} else {
defines = []
}
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
defines += [
"HAVE_SSSE3=1",
"HAVE_SSE41=1",
@@ -75,7 +79,7 @@ template("base64_gn_build") {
@@ -69,7 +73,7 @@ template("base64_gn_build") {
source_set("base64_ssse3") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/ssse3/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [ "-mssse3" ]
}
@@ -85,7 +89,7 @@ template("base64_gn_build") {
@@ -79,7 +83,7 @@ template("base64_gn_build") {
source_set("base64_sse41") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/sse41/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [ "-msse4.1" ]
}
@@ -95,7 +99,7 @@ template("base64_gn_build") {
@@ -89,7 +93,7 @@ template("base64_gn_build") {
source_set("base64_sse42") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/sse42/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [ "-msse4.2" ]
}
@@ -105,7 +109,7 @@ template("base64_gn_build") {
@@ -99,7 +103,7 @@ template("base64_gn_build") {
source_set("base64_avx") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/avx/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [ "-mavx" ]
} else if (is_win) {
@@ -117,7 +121,7 @@ template("base64_gn_build") {
@@ -111,7 +115,7 @@ template("base64_gn_build") {
source_set("base64_avx2") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/avx2/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [ "-mavx2" ]
} else if (is_win) {
@@ -129,7 +133,7 @@ template("base64_gn_build") {
@@ -123,7 +127,7 @@ template("base64_gn_build") {
source_set("base64_avx512") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/avx512/codec.c" ]
- if (target_cpu == "x86" || target_cpu == "x64") {
- if (current_cpu == "x86" || current_cpu == "x64") {
+ if (support_x86_asm) {
if (is_clang || !is_win) {
cflags_c = [
"-mavx512vl",
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe078270585843eca3 100644
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..1717143998ae15e65e9af12650b796226508a137 100644
--- a/deps/cares/BUILD.gn
+++ b/deps/cares/BUILD.gn
@@ -1,14 +1,143 @@
@@ -1,14 +1,165 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
@ -562,36 +564,59 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ sources = [
+ "include/ares.h",
+ "include/ares_dns.h",
+ "include/ares_dns_record.h",
+ "include/ares_nameser.h",
+ "include/ares_rules.h",
+ "include/ares_version.h",
+ "src/lib/ares__addrinfo2hostent.c",
+ "src/lib/ares__addrinfo_localhost.c",
+ "src/lib/ares_android.c",
+ "src/lib/ares__buf.c",
+ "src/lib/ares__buf.h",
+ "src/lib/ares__close_sockets.c",
+ "src/lib/ares__hosts_file.c",
+ "src/lib/ares__htable.c",
+ "src/lib/ares__htable.h",
+ "src/lib/ares__htable_asvp.c",
+ "src/lib/ares__htable_asvp.h",
+ "src/lib/ares__htable_stvp.c",
+ "src/lib/ares__htable_stvp.h",
+ "src/lib/ares__htable_strvp.c",
+ "src/lib/ares__htable_strvp.h",
+ "src/lib/ares__htable_szvp.c",
+ "src/lib/ares__htable_szvp.h",
+ "src/lib/ares__iface_ips.c",
+ "src/lib/ares__iface_ips.h",
+ "src/lib/ares__llist.c",
+ "src/lib/ares__llist.h",
+ "src/lib/ares__get_hostent.c",
+ "src/lib/ares__parse_into_addrinfo.c",
+ "src/lib/ares__read_line.c",
+ "src/lib/ares__readaddrinfo.c",
+ "src/lib/ares__slist.c",
+ "src/lib/ares__slist.h",
+ "src/lib/ares__socket.c",
+ "src/lib/ares__sortaddrinfo.c",
+ "src/lib/ares__threads.c",
+ "src/lib/ares__threads.h",
+ "src/lib/ares__timeval.c",
+ "src/lib/ares_android.c",
+ "src/lib/ares_android.h",
+ "src/lib/ares_cancel.c",
+ "src/lib/ares_create_query.c",
+ "src/lib/ares_data.c",
+ "src/lib/ares_data.h",
+ "src/lib/ares_destroy.c",
+ "src/lib/ares_dns_mapping.c",
+ "src/lib/ares_dns_name.c",
+ "src/lib/ares_dns_parse.c",
+ "src/lib/ares_dns_record.c",
+ "src/lib/ares_dns_private.h",
+ "src/lib/ares_dns_write.c",
+ "src/lib/ares_event.h",
+ "src/lib/ares_event_win32.h",
+ "src/lib/ares_event_epoll.c",
+ "src/lib/ares_event_kqueue.c",
+ "src/lib/ares_event_poll.c",
+ "src/lib/ares_event_select.c",
+ "src/lib/ares_event_thread.c",
+ "src/lib/ares_event_wake_pipe.c",
+ "src/lib/ares_event_win32.c",
+ "src/lib/ares_expand_name.c",
+ "src/lib/ares_expand_string.c",
+ "src/lib/ares_fds.c",
@ -599,6 +624,7 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ "src/lib/ares_free_string.c",
+ "src/lib/ares_freeaddrinfo.c",
+ "src/lib/ares_getaddrinfo.c",
+ "src/lib/ares_getenv.c",
+ "src/lib/ares_getenv.h",
+ "src/lib/ares_gethostbyaddr.c",
+ "src/lib/ares_gethostbyname.c",
@ -606,16 +632,13 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ "src/lib/ares_getsock.c",
+ "src/lib/ares_inet_net_pton.h",
+ "src/lib/ares_init.c",
+ "src/lib/ares_ipv6.h",
+ "src/lib/ares_library_init.c",
+ "src/lib/ares_library_init.h",
+ "src/lib/ares_ipv6.h",
+ "src/lib/ares_math.c",
+ "src/lib/ares_mkquery.c",
+ "src/lib/ares_nameser.h",
+ "src/lib/ares_nowarn.c",
+ "src/lib/ares_nowarn.h",
+ "src/lib/ares_options.c",
+ "src/lib/ares_parse_aaaa_reply.c",
+ "src/lib/ares_parse_a_reply.c",
+ "src/lib/ares_parse_aaaa_reply.c",
+ "src/lib/ares_parse_caa_reply.c",
+ "src/lib/ares_parse_mx_reply.c",
+ "src/lib/ares_parse_naptr_reply.c",
@ -625,9 +648,11 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ "src/lib/ares_parse_srv_reply.c",
+ "src/lib/ares_parse_txt_reply.c",
+ "src/lib/ares_parse_uri_reply.c",
+ "src/lib/ares_platform.c",
+ "src/lib/ares_platform.h",
+ "src/lib/ares_private.h",
+ "src/lib/ares_process.c",
+ "src/lib/ares_qcache.c",
+ "src/lib/ares_query.c",
+ "src/lib/ares_rand.c",
+ "src/lib/ares_search.c",
@ -635,14 +660,16 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ "src/lib/ares_setup.h",
+ "src/lib/ares_strcasecmp.c",
+ "src/lib/ares_strcasecmp.h",
+ "src/lib/ares_strdup.c",
+ "src/lib/ares_strdup.h",
+ "src/lib/ares_str.c",
+ "src/lib/ares_str.h",
+ "src/lib/ares_strerror.c",
+ "src/lib/ares_strsplit.c",
+ "src/lib/ares_strsplit.h",
+ "src/lib/ares_sysconfig.c",
+ "src/lib/ares_sysconfig_files.c",
+ "src/lib/ares_timeout.c",
+ "src/lib/ares_update_servers.c",
+ "src/lib/ares_version.c",
+ "src/lib/bitncmp.c",
+ "src/lib/bitncmp.h",
+ "src/lib/inet_net_pton.c",
+ "src/lib/inet_ntop.c",
+ "src/lib/setup_once.h",
@ -666,9 +693,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..fb1b3138cdb674205afa0ffe07827058
+ defines += [ "CARES_PULL_WS2TCPIP_H=1" ]
+ include_dirs += [ "config/win32" ]
+ sources += [
+ "src/lib/ares_getenv.c",
+ "src/lib/ares_iphlpapi.h",
+ "src/lib/ares_platform.c",
+ "src/lib/config-win32.h",
+ "src/lib/windows_port.c",
+ ]
@ -838,7 +862,7 @@ index 64a2a4799d5530276f46aa1faa63ece063390ada..fb000f8ee7647c375bc190d1729d67bb
+ ]
}
diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn
index 274352b0e2449f8db49d9a49c6b92a69f97e8363..7d2ca477db2415f43ababa270d8aefa3124b2765 100644
index 274352b0e2449f8db49d9a49c6b92a69f97e8363..f04c7ca24af6cdbe8d739bcd55172110963888e9 100644
--- a/deps/nghttp2/BUILD.gn
+++ b/deps/nghttp2/BUILD.gn
@@ -1,14 +1,51 @@
@ -888,7 +912,7 @@ index 274352b0e2449f8db49d9a49c6b92a69f97e8363..7d2ca477db2415f43ababa270d8aefa3
+ "lib/nghttp2_http.c",
+ "lib/nghttp2_map.c",
+ "lib/nghttp2_mem.c",
+ "lib/nghttp2_npn.c",
+ "lib/nghttp2_alpn.c",
+ "lib/nghttp2_option.c",
+ "lib/nghttp2_outbound_item.c",
+ "lib/nghttp2_pq.c",
@ -901,7 +925,7 @@ index 274352b0e2449f8db49d9a49c6b92a69f97e8363..7d2ca477db2415f43ababa270d8aefa3
+ "lib/nghttp2_submit.c",
+ "lib/nghttp2_time.c",
+ "lib/nghttp2_version.c",
+ "lib/sfparse.c"
+ "lib/sfparse.c",
+ ]
}
diff --git a/deps/simdjson/BUILD.gn b/deps/simdjson/BUILD.gn
@ -1234,10 +1258,10 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334fb05654f
index 0000000000000000000000000000000000000000..12f844c771c19c8d27dcfb9210dcf7bc77b2e994
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,733 @@
@@ -0,0 +1,739 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@ -1308,6 +1332,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "//v8/include/v8-promise.h",
+ "//v8/include/v8-proxy.h",
+ "//v8/include/v8-regexp.h",
+ "//v8/include/v8-sandbox.h",
+ "//v8/include/v8-script.h",
+ "//v8/include/v8-snapshot.h",
+ "//v8/include/v8-source-location.h",
@ -1692,6 +1717,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "lib/readline.js",
+ "lib/readline/promises.js",
+ "lib/repl.js",
+ "lib/sea.js",
+ "lib/stream.js",
+ "lib/stream/consumers.js",
+ "lib/stream/promises.js",
@ -1748,6 +1774,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "src/connection_wrap.cc",
+ "src/dataqueue/queue.cc",
+ "src/debug_utils.cc",
+ "src/embedded_data.cc",
+ "src/encoding_binding.cc",
+ "src/env.cc",
+ "src/fs_event_wrap.cc",
@ -1817,6 +1844,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "src/node_watchdog.cc",
+ "src/node_worker.cc",
+ "src/node_zlib.cc",
+ "src/path.cc",
+ "src/permission/child_process_permission.cc",
+ "src/permission/fs_permission.cc",
+ "src/permission/inspector_permission.cc",
@ -1865,6 +1893,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "src/dataqueue/queue.h",
+ "src/debug_utils.h",
+ "src/debug_utils-inl.h",
+ "src/embeded_data.h",
+ "src/encoding_binding.h",
+ "src/env_properties.h",
+ "src/env.h",
@ -1936,6 +1965,7 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ "src/node_wasi.h",
+ "src/node_watchdog.h",
+ "src/node_worker.h",
+ "src/path.h",
+ "src/permission/child_process_permission.h",
+ "src/permission/fs_permission.h",
+ "src/permission/inspector_permission.h",
@ -1972,10 +2002,10 @@ index 0000000000000000000000000000000000000000..4404338bb5d576b341cae3bf79c84334
+ ]
+}
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
index 909fd14345fcd988c381e640280f4b33f2e0c351..cb0e4558436ab7a109cadf439d49413b0f569a5a 100644
index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccbc9f34661 100644
--- a/src/inspector/BUILD.gn
+++ b/src/inspector/BUILD.gn
@@ -1,14 +1,203 @@
@@ -1,14 +1,202 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
@ -2068,7 +2098,6 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..cb0e4558436ab7a109cadf439d49413b
+ "$inspector_protocol_dir/lib/base_string_adapter_cc.template",
+ "$inspector_protocol_dir/lib/base_string_adapter_h.template",
+ "$inspector_protocol_dir/lib/Allocator_h.template",
+ "$inspector_protocol_dir/lib/Array_h.template",
+ "$inspector_protocol_dir/lib/DispatcherBase_cpp.template",
+ "$inspector_protocol_dir/lib/DispatcherBase_h.template",
+ "$inspector_protocol_dir/lib/ErrorSupport_cpp.template",
@ -2190,10 +2219,10 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..cb0e4558436ab7a109cadf439d49413b
+ args = rebase_path(inputs + outputs, root_build_dir)
}
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index bafd8d4b8581f0aee6cb1f30b810c8dfc46c2ce9..453d874efff767a95ef25fad7005ac11717f0c67 100644
index bbb63df7899d4b9bf80e13eee78453352dd5c75b..804296db12f7864f72648f5f36834a924503e4a6 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -739,6 +739,7 @@ void BuiltinLoader::RegisterExternalReferences(
@@ -765,6 +765,7 @@ void BuiltinLoader::RegisterExternalReferences(
registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@ -2202,7 +2231,7 @@ index bafd8d4b8581f0aee6cb1f30b810c8dfc46c2ce9..453d874efff767a95ef25fad7005ac11
} // namespace builtins
diff --git a/src/node_builtins.h b/src/node_builtins.h
index 9f2fbc1e53937448aa27c1f5fe110eabc7edc0df..ea77c7598153bb8a9ba20c89a4ece2c1580b9a25 100644
index 75a7f3dd89e096d13ad7d70ed29d301cd56315b5..9a20a275fbe5df9f384b7b1d1d26806e7cd05384 100644
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =
@ -2336,229 +2365,33 @@ index 0000000000000000000000000000000000000000..a6cdf33f2c0bcca4d7b4eacaa407f1ac
+ transformed_f.write(transformed_contents)
+
diff --git a/tools/install.py b/tools/install.py
index 11616e1bcac5308020eb68fdb811bfb86cb14dd5..74b01f8352021f1105c080dbbf8bb29121a13501 100755
index 17b0947aaca4cd63ce6b57ffc4835eae7f74e76e..c6fa8a931f6a1357592a8447b1abbfe0c894aefd 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -199,105 +199,108 @@ def headers(action):
v8_headers = [
# The internal cppgc headers are depended on by the public
# ones, so they need to be included as well.
- 'deps/v8/include/cppgc/internal/api-constants.h',
- 'deps/v8/include/cppgc/internal/atomic-entry-flag.h',
- 'deps/v8/include/cppgc/internal/base-page-handle.h',
- 'deps/v8/include/cppgc/internal/caged-heap-local-data.h',
- 'deps/v8/include/cppgc/internal/caged-heap.h',
- 'deps/v8/include/cppgc/internal/compiler-specific.h',
- 'deps/v8/include/cppgc/internal/finalizer-trait.h',
- 'deps/v8/include/cppgc/internal/gc-info.h',
- 'deps/v8/include/cppgc/internal/logging.h',
- 'deps/v8/include/cppgc/internal/member-storage.h',
- 'deps/v8/include/cppgc/internal/name-trait.h',
- 'deps/v8/include/cppgc/internal/persistent-node.h',
- 'deps/v8/include/cppgc/internal/pointer-policies.h',
- 'deps/v8/include/cppgc/internal/write-barrier.h',
+ '../../v8/include/cppgc/internal/api-constants.h',
+ '../../v8/include/cppgc/internal/atomic-entry-flag.h',
+ '../../v8/include/cppgc/internal/base-page-handle.h',
+ '../../v8/include/cppgc/internal/caged-heap-local-data.h',
+ '../../v8/include/cppgc/internal/caged-heap.h',
+ '../../v8/include/cppgc/internal/compiler-specific.h',
+ '../../v8/include/cppgc/internal/finalizer-trait.h',
+ '../../v8/include/cppgc/internal/gc-info.h',
+ '../../v8/include/cppgc/internal/logging.h',
+ '../../v8/include/cppgc/internal/member-storage.h',
+ '../../v8/include/cppgc/internal/name-trait.h',
+ '../../v8/include/cppgc/internal/persistent-node.h',
+ '../../v8/include/cppgc/internal/pointer-policies.h',
+ '../../v8/include/cppgc/internal/write-barrier.h',
# cppgc headers
- 'deps/v8/include/cppgc/allocation.h',
- 'deps/v8/include/cppgc/common.h',
- 'deps/v8/include/cppgc/cross-thread-persistent.h',
- 'deps/v8/include/cppgc/custom-space.h',
- 'deps/v8/include/cppgc/default-platform.h',
- 'deps/v8/include/cppgc/ephemeron-pair.h',
- 'deps/v8/include/cppgc/explicit-management.h',
- 'deps/v8/include/cppgc/garbage-collected.h',
- 'deps/v8/include/cppgc/heap-consistency.h',
- 'deps/v8/include/cppgc/heap-handle.h',
- 'deps/v8/include/cppgc/heap-state.h',
- 'deps/v8/include/cppgc/heap-statistics.h',
- 'deps/v8/include/cppgc/heap.h',
- 'deps/v8/include/cppgc/liveness-broker.h',
- 'deps/v8/include/cppgc/macros.h',
- 'deps/v8/include/cppgc/member.h',
- 'deps/v8/include/cppgc/name-provider.h',
- 'deps/v8/include/cppgc/object-size-trait.h',
- 'deps/v8/include/cppgc/persistent.h',
- 'deps/v8/include/cppgc/platform.h',
- 'deps/v8/include/cppgc/prefinalizer.h',
- 'deps/v8/include/cppgc/process-heap-statistics.h',
- 'deps/v8/include/cppgc/sentinel-pointer.h',
- 'deps/v8/include/cppgc/source-location.h',
- 'deps/v8/include/cppgc/testing.h',
- 'deps/v8/include/cppgc/trace-trait.h',
- 'deps/v8/include/cppgc/type-traits.h',
- 'deps/v8/include/cppgc/visitor.h',
+ '../../v8/include/cppgc/allocation.h',
+ '../../v8/include/cppgc/common.h',
+ '../../v8/include/cppgc/cross-thread-persistent.h',
+ '../../v8/include/cppgc/custom-space.h',
+ '../../v8/include/cppgc/default-platform.h',
+ '../../v8/include/cppgc/ephemeron-pair.h',
+ '../../v8/include/cppgc/explicit-management.h',
+ '../../v8/include/cppgc/garbage-collected.h',
+ '../../v8/include/cppgc/heap-consistency.h',
+ '../../v8/include/cppgc/heap-handle.h',
+ '../../v8/include/cppgc/heap-state.h',
+ '../../v8/include/cppgc/heap-statistics.h',
+ '../../v8/include/cppgc/heap.h',
+ '../../v8/include/cppgc/liveness-broker.h',
+ '../../v8/include/cppgc/macros.h',
+ '../../v8/include/cppgc/member.h',
+ '../../v8/include/cppgc/name-provider.h',
+ '../../v8/include/cppgc/object-size-trait.h',
+ '../../v8/include/cppgc/persistent.h',
+ '../../v8/include/cppgc/platform.h',
+ '../../v8/include/cppgc/prefinalizer.h',
+ '../../v8/include/cppgc/process-heap-statistics.h',
+ '../../v8/include/cppgc/sentinel-pointer.h',
+ '../../v8/include/cppgc/source-location.h',
+ '../../v8/include/cppgc/testing.h',
+ '../../v8/include/cppgc/trace-trait.h',
+ '../../v8/include/cppgc/type-traits.h',
+ '../../v8/include/cppgc/visitor.h',
# libplatform headers
- 'deps/v8/include/libplatform/libplatform-export.h',
- 'deps/v8/include/libplatform/libplatform.h',
- 'deps/v8/include/libplatform/v8-tracing.h',
+ '../../v8/include/libplatform/libplatform-export.h',
+ '../../v8/include/libplatform/libplatform.h',
+ '../../v8/include/libplatform/v8-tracing.h',
# v8 headers
- 'deps/v8/include/v8-array-buffer.h',
- 'deps/v8/include/v8-callbacks.h',
- 'deps/v8/include/v8-container.h',
- 'deps/v8/include/v8-context.h',
- 'deps/v8/include/v8-cppgc.h',
- 'deps/v8/include/v8-data.h',
- 'deps/v8/include/v8-date.h',
- 'deps/v8/include/v8-debug.h',
- 'deps/v8/include/v8-embedder-heap.h',
- 'deps/v8/include/v8-embedder-state-scope.h',
- 'deps/v8/include/v8-exception.h',
- 'deps/v8/include/v8-extension.h',
- 'deps/v8/include/v8-external.h',
- 'deps/v8/include/v8-forward.h',
- 'deps/v8/include/v8-function-callback.h',
- 'deps/v8/include/v8-function.h',
- 'deps/v8/include/v8-initialization.h',
- 'deps/v8/include/v8-internal.h',
- 'deps/v8/include/v8-isolate.h',
- 'deps/v8/include/v8-json.h',
- 'deps/v8/include/v8-local-handle.h',
- 'deps/v8/include/v8-locker.h',
- 'deps/v8/include/v8-maybe.h',
- 'deps/v8/include/v8-memory-span.h',
- 'deps/v8/include/v8-message.h',
- 'deps/v8/include/v8-microtask-queue.h',
- 'deps/v8/include/v8-microtask.h',
- 'deps/v8/include/v8-object.h',
- 'deps/v8/include/v8-persistent-handle.h',
- 'deps/v8/include/v8-platform.h',
- 'deps/v8/include/v8-primitive-object.h',
- 'deps/v8/include/v8-primitive.h',
- 'deps/v8/include/v8-profiler.h',
- 'deps/v8/include/v8-promise.h',
- 'deps/v8/include/v8-proxy.h',
- 'deps/v8/include/v8-regexp.h',
- 'deps/v8/include/v8-script.h',
- 'deps/v8/include/v8-snapshot.h',
- 'deps/v8/include/v8-statistics.h',
- 'deps/v8/include/v8-template.h',
- 'deps/v8/include/v8-traced-handle.h',
- 'deps/v8/include/v8-typed-array.h',
- 'deps/v8/include/v8-unwinder.h',
- 'deps/v8/include/v8-value-serializer.h',
- 'deps/v8/include/v8-value.h',
- 'deps/v8/include/v8-version.h',
- 'deps/v8/include/v8-wasm.h',
- 'deps/v8/include/v8-weak-callback-info.h',
- 'deps/v8/include/v8.h',
- 'deps/v8/include/v8config.h',
+ '../../v8/include/v8-array-buffer.h',
+ '../../v8/include/v8-callbacks.h',
+ '../../v8/include/v8-container.h',
+ '../../v8/include/v8-context.h',
+ '../../v8/include/v8-cppgc.h',
+ '../../v8/include/v8-data.h',
+ '../../v8/include/v8-date.h',
+ '../../v8/include/v8-debug.h',
+ '../../v8/include/v8-embedder-heap.h',
+ '../../v8/include/v8-embedder-state-scope.h',
+ '../../v8/include/v8-exception.h',
+ '../../v8/include/v8-extension.h',
+ '../../v8/include/v8-external.h',
+ '../../v8/include/v8-forward.h',
+ '../../v8/include/v8-function-callback.h',
+ '../../v8/include/v8-function.h',
+ '../../v8/include/v8-handle-base.h',
+ '../../v8/include/v8-initialization.h',
+ '../../v8/include/v8-internal.h',
+ '../../v8/include/v8-isolate.h',
+ '../../v8/include/v8-json.h',
+ '../../v8/include/v8-local-handle.h',
+ '../../v8/include/v8-locker.h',
+ '../../v8/include/v8-maybe.h',
+ '../../v8/include/v8-memory-span.h',
+ '../../v8/include/v8-message.h',
+ '../../v8/include/v8-microtask-queue.h',
+ '../../v8/include/v8-microtask.h',
+ '../../v8/include/v8-object.h',
+ '../../v8/include/v8-persistent-handle.h',
+ '../../v8/include/v8-platform.h',
+ '../../v8/include/v8-primitive-object.h',
+ '../../v8/include/v8-primitive.h',
+ '../../v8/include/v8-profiler.h',
+ '../../v8/include/v8-promise.h',
+ '../../v8/include/v8-proxy.h',
+ '../../v8/include/v8-regexp.h',
+ '../../v8/include/v8-script.h',
+ '../../v8/include/v8-snapshot.h',
+ '../../v8/include/v8-source-location.h',
+ '../../v8/include/v8-statistics.h',
+ '../../v8/include/v8-template.h',
+ '../../v8/include/v8-traced-handle.h',
+ '../../v8/include/v8-typed-array.h',
+ '../../v8/include/v8-unwinder.h',
+ '../../v8/include/v8-value-serializer.h',
+ '../../v8/include/v8-value.h',
+ '../../v8/include/v8-version.h',
+ '../../v8/include/v8-wasm.h',
+ '../../v8/include/v8-weak-callback-info.h',
+ '../../v8/include/v8.h',
+ '../../v8/include/v8config.h',
]
+ v8_headers = [h.replace('deps/', '../../') for h in v8_headers]
files_arg = [name for name in files_arg if name in v8_headers]
action(files_arg, dest)
@@ -324,7 +327,7 @@ def headers(action):
if sys.platform.startswith('aix') or sys.platform == "os400":
action(['out/Release/node.exp'], 'include/node/')
- subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers)
+ subdir_files('../../v8/include', 'include/node/', wanted_v8_headers)
if 'false' == variables.get('node_shared_libuv'):
subdir_files('deps/uv/include', 'include/node/', action)
@@ -284,6 +284,7 @@ def headers(options, action):
'include/v8-promise.h',
'include/v8-proxy.h',
'include/v8-regexp.h',
+ "include/v8-sandbox.h",
'include/v8-script.h',
'include/v8-snapshot.h',
'include/v8-statistics.h',
@@ -390,7 +391,7 @@ def parse_options(args):
parser.add_argument('--build-dir', help='the location of built binaries',
default='out/Release')
parser.add_argument('--v8-dir', help='the location of V8',
- default='deps/v8')
+ default='../../v8')
parser.add_argument('--config-gypi-path', help='the location of config.gypi',
default='config.gypi')
parser.add_argument('--is-win', help='build for Windows target',
diff --git a/tools/js2c.cc b/tools/js2c.cc
old mode 100644
new mode 100755
index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26721d1413
index 0fa9c5954d24a555a1e7c50fdb4b43c17cb1452d..9a77af51630aec5437a09aae1d7296e2e1238809
--- a/tools/js2c.cc
+++ b/tools/js2c.cc
@@ -29,6 +29,7 @@ namespace js2c {
@@ -30,6 +30,7 @@ namespace js2c {
int Main(int argc, char* argv[]);
static bool is_verbose = false;
@ -2566,7 +2399,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
void Debug(const char* format, ...) {
va_list arguments;
@@ -195,6 +196,7 @@ const char* kTemplate = R"(
@@ -196,6 +197,7 @@ const char* kTemplate = R"(
#include "node_builtins.h"
#include "node_external_reference.h"
#include "node_internals.h"
@ -2574,7 +2407,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
namespace node {
@@ -210,7 +212,11 @@ const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
@@ -211,7 +213,11 @@ const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
} // anonymous namespace
void BuiltinLoader::LoadJavaScriptSource() {
@ -2587,7 +2420,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
}
void RegisterExternalReferencesForInternalizedBuiltinCode(
@@ -227,6 +233,45 @@ UnionBytes BuiltinLoader::GetConfig() {
@@ -228,6 +234,45 @@ UnionBytes BuiltinLoader::GetConfig() {
} // namespace node
)";
@ -2633,7 +2466,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
Fragment Format(const Fragments& definitions,
const Fragments& initializers,
const Fragments& registrations) {
@@ -236,13 +281,12 @@ Fragment Format(const Fragments& definitions,
@@ -237,13 +282,12 @@ Fragment Format(const Fragments& definitions,
size_t init_size = init_buf.size();
std::vector<char> reg_buf = Join(registrations, "\n");
size_t reg_size = reg_buf.size();
@ -2650,7 +2483,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
static_cast<int>(def_buf.size()),
def_buf.data(),
static_cast<int>(init_buf.size()),
@@ -711,12 +755,15 @@ int JS2C(const FileList& js_files,
@@ -834,12 +878,15 @@ int JS2C(const FileList& js_files,
}
}
@ -2666,7 +2499,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
Fragment out = Format(definitions, initializers, registrations);
return WriteIfChanged(out, dest);
}
@@ -742,6 +789,8 @@ int Main(int argc, char* argv[]) {
@@ -865,6 +912,8 @@ int Main(int argc, char* argv[]) {
std::string arg(argv[i]);
if (arg == "--verbose") {
is_verbose = true;
@ -2675,7 +2508,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
} else if (arg == "--root") {
if (i == argc - 1) {
fprintf(stderr, "--root must be followed by a path\n");
@@ -790,6 +839,14 @@ int Main(int argc, char* argv[]) {
@@ -913,6 +962,14 @@ int Main(int argc, char* argv[]) {
}
}
@ -2690,7 +2523,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
// Should have exactly 3 types: `.js`, `.mjs` and `.gypi`.
assert(file_map.size() == 3);
auto gypi_it = file_map.find(".gypi");
@@ -809,6 +866,7 @@ int Main(int argc, char* argv[]) {
@@ -932,6 +989,7 @@ int Main(int argc, char* argv[]) {
std::sort(mjs_it->second.begin(), mjs_it->second.end());
return JS2C(js_it->second, mjs_it->second, gypi_it->second[0], output);
@ -2698,7 +2531,7 @@ index 904fb6fa44d4f56fb67476e937edcbb797d78fe7..129cd4b2c12b58464fbab8355afa0c26
}
} // namespace js2c
} // namespace node
@@ -817,4 +875,4 @@ NODE_MAIN(int argc, node::argv_type raw_argv[]) {
@@ -940,4 +998,4 @@ NODE_MAIN(int argc, node::argv_type raw_argv[]) {
char** argv;
node::FixupMain(argc, raw_argv, &argv);
return node::js2c::Main(argc, argv);