Skip to content

Commit f965b13

Browse files
chore: bump node to v12.16.1 (master) (#22168)
* chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch nodejs/node#30862 * Fixup InternalCallbackScope patch nodejs/node#30236 * Fixup GN buildfiles patch nodejs/node#30755 * Fixup low-level hooks patch nodejs/node#30466 * Fixup globals require patch nodejs/node#31643 * Fixup process stream patch nodejs/node#30862 * Fixup js2c modification patch nodejs/node#30755 * Fixup internal fs override patch nodejs/node#30610 * Fixup context-aware warn patch nodejs/node#30336 * Fixup Node.js with ltcg config nodejs/node#29388 * Fixup oaepLabel patch nodejs/node#30917 * Remove redundant ESM test patch nodejs/node#30997 * Remove redundant cli flag patch nodejs/node#30466 * Update filenames.json * Remove macro generation in GN build files nodejs/node#30755 * Fix some compilation errors upstream * Add uvwasi to deps nodejs/node#30258 * Fix BoringSSL incompatibilities * Fixup linked module patch nodejs/node#30274 * Add missing sources to GN uv build libuv/libuv#2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch nodejs/node#30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly nodejs/node#30025 * Disable new esm syntax specs nodejs/node#30219 * Fixup v8 weakref hook spec nodejs/node#29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on nodejs/node#29777, and we don't override prepareStackTrace. * Disable new tls specs nodejs/node#23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 360c1ca commit f965b13

25 files changed

Lines changed: 441 additions & 269 deletions

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vars = {
1414
'chromium_version':
1515
'ddac4c3cc1528254008f9e7a2aea5d4426906bfd',
1616
'node_version':
17-
'v12.15.0',
17+
'v12.16.1',
1818
'nan_version':
1919
'2ee313aaca52e2b478965ac50eb5082520380d1b',
2020

patches/node/.patches

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ fix_include_libuv_header_in_node_binding.patch
3131
remove_deprecated_task_api_override_removed_in_latest_v8.patch
3232
remove_serialization_deserialization_of_wasmmoduleobject.patch
3333
64bit_bump_typedarray_max_length_to_2_32-1_elements.patch
34-
test_use_tmpdir_refresh_in_test-esm-windows_js.patch
3534
override_existing_v8_reallocate.patch
36-
feat_enable_passing_cli_flags.patch
35+
fix_use_hex_not_decimal_for_clarity.patch
36+
fix_use_crypto_impls_for_compat.patch
37+
fix_ensure_clocks_header_included_in_impl.patch
38+
fix_remove_implicit_type_conversions.patch
39+
fix_include_io_h_in_uvwasi_for_win.patch
40+
fix_--perf-prof_only_works_on_linux.patch
41+
fix_we_need_to_eager-load_cjs_modules.patch

patches/node/build_add_gn_build_files.patch

Lines changed: 79 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
77

88
diff --git a/BUILD.gn b/BUILD.gn
99
new file mode 100644
10-
index 0000000000000000000000000000000000000000..ec06e14dd327cdf89dc6fd584b6972ae64311ea0
10+
index 0000000000000000000000000000000000000000..e4aab62b85e6ea1eac68cc21056081b4ff4bd1d6
1111
--- /dev/null
1212
+++ b/BUILD.gn
13-
@@ -0,0 +1,370 @@
13+
@@ -0,0 +1,358 @@
1414
+import("//electron/build/asar.gni")
1515
+import("//v8/gni/v8.gni")
1616
+
@@ -88,28 +88,15 @@ index 0000000000000000000000000000000000000000..ec06e14dd327cdf89dc6fd584b6972ae
8888
+ ":generate_config_gypi",
8989
+ ":node_js2c_inputs",
9090
+ ]
91-
+
92-
+ macro_inputs = []
93-
+ if (!node_use_dtrace && !node_use_etw) {
94-
+ macro_inputs += [ "tools/js2c_macros/notrace_macros.py" ]
95-
+ }
96-
+ if (node_debug_lib) {
97-
+ macro_inputs += [ "tools/js2c_macros/nodcheck_macros.py" ]
98-
+ } else {
99-
+ macro_inputs += [ "tools/js2c_macros/dcheck_macros.py" ]
100-
+ }
101-
+ macro_inputs += [ "tools/js2c_macros/check_macros.py" ]
102-
+
10391
+ config_gypi = [ "$target_gen_dir/config.gypi" ]
104-
+
105-
+ inputs = library_files + macro_inputs + config_gypi
92+
+ inputs = library_files + config_gypi
10693
+ outputs = [
10794
+ "$target_gen_dir/node_javascript.cc",
10895
+ ]
10996
+
11097
+ cwd = "$target_gen_dir/js2c_inputs"
11198
+ script = "tools/js2c.py"
112-
+ args = library_files + rebase_path(macro_inputs + config_gypi) + ["--target"] + rebase_path(outputs)
99+
+ args = library_files + rebase_path(config_gypi) + ["--target"] + rebase_path(outputs)
113100
+}
114101
+
115102
+config("node_features") {
@@ -221,6 +208,7 @@ index 0000000000000000000000000000000000000000..ec06e14dd327cdf89dc6fd584b6972ae
221208
+ "deps/http_parser",
222209
+ "deps/llhttp",
223210
+ "deps/nghttp2",
211+
+ "deps/uvwasi",
224212
+ "deps/zlib",
225213
+ "//third_party/brotli:dec",
226214
+ "//third_party/brotli:enc",
@@ -628,10 +616,10 @@ index 0000000000000000000000000000000000000000..66af819990b338caa49ca59d1fe6c5ad
628616
+}
629617
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
630618
new file mode 100644
631-
index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d1cf42562
619+
index 0000000000000000000000000000000000000000..510d86194ed71d78b2c89c7a77422afc0ef614ad
632620
--- /dev/null
633621
+++ b/deps/uv/BUILD.gn
634-
@@ -0,0 +1,185 @@
622+
@@ -0,0 +1,190 @@
635623
+config("libuv_config") {
636624
+ include_dirs = [ "include" ]
637625
+
@@ -691,6 +679,7 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
691679
+ "src/idna.c",
692680
+ "src/idna.h",
693681
+ "src/inet.c",
682+
+ "src/random.c",
694683
+ "src/queue.h",
695684
+ "src/strscpy.c",
696685
+ "src/strscpy.h",
@@ -769,6 +758,7 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
769758
+ "src/unix/pipe.c",
770759
+ "src/unix/poll.c",
771760
+ "src/unix/process.c",
761+
+ "src/unix/random-devurandom.c",
772762
+ "src/unix/pthread-fixes.c",
773763
+ "src/unix/signal.c",
774764
+ "src/unix/spinlock.h",
@@ -787,6 +777,7 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
787777
+ if (is_mac) {
788778
+ sources += [
789779
+ "src/unix/darwin-proctitle.c",
780+
+ "src/unix/random-getentropy.c",
790781
+ "src/unix/darwin.c",
791782
+ "src/unix/fsevents.c",
792783
+ ]
@@ -803,6 +794,8 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
803794
+ "src/unix/linux-syscalls.c",
804795
+ "src/unix/linux-syscalls.h",
805796
+ "src/unix/procfs-exepath.c",
797+
+ "src/unix/random-getrandom.c",
798+
+ "src/unix/random-sysctl-linux.c",
806799
+ "src/unix/sysinfo-loadavg.c",
807800
+ ]
808801
+ libs += [
@@ -817,6 +810,46 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
817810
+ ]
818811
+ }
819812
+}
813+
diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
814+
new file mode 100644
815+
index 0000000000000000000000000000000000000000..52d0c08bd9818b9436175ea8157e462e4d0fbafe
816+
--- /dev/null
817+
+++ b/deps/uvwasi/BUILD.gn
818+
@@ -0,0 +1,34 @@
819+
+config("uvwasi_config") {
820+
+ include_dirs = [ "include" ]
821+
+}
822+
+
823+
+static_library("uvwasi") {
824+
+ include_dirs = [
825+
+ "include",
826+
+ "src",
827+
+ ]
828+
+
829+
+ defines = []
830+
+ if (is_linux) {
831+
+ defines += [
832+
+ "_GNU_SOURCE",
833+
+ "_POSIX_C_SOURCE=200112"
834+
+ ]
835+
+ }
836+
+
837+
+ deps = [ "../../deps/uv" ]
838+
+
839+
+ public_configs = [ ":uvwasi_config" ]
840+
+
841+
+ cflags_c = []
842+
+ if (!is_win) {
843+
+ cflags_c += [ "-fvisibility=hidden" ]
844+
+ }
845+
+
846+
+ sources = [
847+
+ "src/clocks.c",
848+
+ "src/fd_table.c",
849+
+ "src/uv_mapping.c",
850+
+ "src/uvwasi.c",
851+
+ ]
852+
+}
820853
diff --git a/deps/zlib/BUILD.gn b/deps/zlib/BUILD.gn
821854
new file mode 100644
822855
index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2eaaea76280
@@ -883,10 +916,10 @@ index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2ea
883916
+}
884917
diff --git a/filenames.json b/filenames.json
885918
new file mode 100644
886-
index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1fad1cc946
919+
index 0000000000000000000000000000000000000000..147561938788aac7021fe340f64fd8b4303603e6
887920
--- /dev/null
888921
+++ b/filenames.json
889-
@@ -0,0 +1,448 @@
922+
@@ -0,0 +1,461 @@
890923
+// This file is automatically generated by generate_gn_filenames_json.py
891924
+// DO NOT EDIT
892925
+{
@@ -959,6 +992,10 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
959992
+ "lib/internal/bootstrap/loaders.js",
960993
+ "lib/internal/bootstrap/node.js",
961994
+ "lib/internal/bootstrap/pre_execution.js",
995+
+ "lib/internal/bootstrap/switches/does_own_process_state.js",
996+
+ "lib/internal/bootstrap/switches/does_not_own_process_state.js",
997+
+ "lib/internal/bootstrap/switches/is_main_thread.js",
998+
+ "lib/internal/bootstrap/switches/is_not_main_thread.js",
962999
+ "lib/internal/per_context/primordials.js",
9631000
+ "lib/internal/per_context/domexception.js",
9641001
+ "lib/async_hooks.js",
@@ -1013,6 +1050,7 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
10131050
+ "lib/util.js",
10141051
+ "lib/v8.js",
10151052
+ "lib/vm.js",
1053+
+ "lib/wasi.js",
10161054
+ "lib/worker_threads.js",
10171055
+ "lib/zlib.js",
10181056
+ "lib/internal/assert.js",
@@ -1021,6 +1059,7 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
10211059
+ "lib/internal/buffer.js",
10221060
+ "lib/internal/cli_table.js",
10231061
+ "lib/internal/child_process.js",
1062+
+ "lib/internal/child_process/serialization.js",
10241063
+ "lib/internal/cluster/child.js",
10251064
+ "lib/internal/cluster/master.js",
10261065
+ "lib/internal/cluster/round_robin_handle.js",
@@ -1068,20 +1107,23 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
10681107
+ "lib/internal/main/eval_string.js",
10691108
+ "lib/internal/main/eval_stdin.js",
10701109
+ "lib/internal/main/inspect.js",
1071-
+ "lib/internal/main/print_bash_completion.js",
10721110
+ "lib/internal/main/print_help.js",
10731111
+ "lib/internal/main/prof_process.js",
10741112
+ "lib/internal/main/repl.js",
10751113
+ "lib/internal/main/run_main_module.js",
10761114
+ "lib/internal/main/run_third_party_main.js",
10771115
+ "lib/internal/main/worker_thread.js",
1116+
+ "lib/internal/modules/run_main.js",
10781117
+ "lib/internal/modules/cjs/helpers.js",
10791118
+ "lib/internal/modules/cjs/loader.js",
10801119
+ "lib/internal/modules/esm/loader.js",
10811120
+ "lib/internal/modules/esm/create_dynamic_module.js",
1082-
+ "lib/internal/modules/esm/default_resolve.js",
1121+
+ "lib/internal/modules/esm/get_format.js",
1122+
+ "lib/internal/modules/esm/get_source.js",
10831123
+ "lib/internal/modules/esm/module_job.js",
10841124
+ "lib/internal/modules/esm/module_map.js",
1125+
+ "lib/internal/modules/esm/resolve.js",
1126+
+ "lib/internal/modules/esm/transform_source.js",
10851127
+ "lib/internal/modules/esm/translators.js",
10861128
+ "lib/internal/net.js",
10871129
+ "lib/internal/options.js",
@@ -1090,14 +1132,13 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
10901132
+ "lib/internal/priority_queue.js",
10911133
+ "lib/internal/process/esm_loader.js",
10921134
+ "lib/internal/process/execution.js",
1093-
+ "lib/internal/process/main_thread_only.js",
10941135
+ "lib/internal/process/per_thread.js",
10951136
+ "lib/internal/process/policy.js",
10961137
+ "lib/internal/process/promises.js",
1097-
+ "lib/internal/process/stdio.js",
10981138
+ "lib/internal/process/warning.js",
10991139
+ "lib/internal/process/worker_thread_only.js",
11001140
+ "lib/internal/process/report.js",
1141+
+ "lib/internal/process/signal.js",
11011142
+ "lib/internal/process/task_queues.js",
11021143
+ "lib/internal/querystring.js",
11031144
+ "lib/internal/readline/utils.js",
@@ -1128,19 +1169,19 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
11281169
+ "lib/internal/v8_prof_processor.js",
11291170
+ "lib/internal/validators.js",
11301171
+ "lib/internal/stream_base_commons.js",
1131-
+ "lib/internal/vm/source_text_module.js",
1172+
+ "lib/internal/vm/module.js",
11321173
+ "lib/internal/worker.js",
11331174
+ "lib/internal/worker/io.js",
11341175
+ "lib/internal/streams/lazy_transform.js",
11351176
+ "lib/internal/streams/async_iterator.js",
11361177
+ "lib/internal/streams/buffer_list.js",
11371178
+ "lib/internal/streams/duplexpair.js",
1179+
+ "lib/internal/streams/from.js",
11381180
+ "lib/internal/streams/legacy.js",
11391181
+ "lib/internal/streams/destroy.js",
11401182
+ "lib/internal/streams/state.js",
11411183
+ "lib/internal/streams/pipeline.js",
11421184
+ "lib/internal/streams/end-of-stream.js",
1143-
+ "lib/internal/streams/from.js",
11441185
+ "deps/v8/tools/splaytree.js",
11451186
+ "deps/v8/tools/codemap.js",
11461187
+ "deps/v8/tools/consarray.js",
@@ -1226,6 +1267,7 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
12261267
+ "src/node_url.cc",
12271268
+ "src/node_util.cc",
12281269
+ "src/node_v8.cc",
1270+
+ "src/node_wasi.cc",
12291271
+ "src/node_watchdog.cc",
12301272
+ "src/node_worker.cc",
12311273
+ "src/node_zlib.cc",
@@ -1280,12 +1322,15 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
12801322
+ "src/node_dir.h",
12811323
+ "src/node_errors.h",
12821324
+ "src/node_file.h",
1325+
+ "src/node_file-inl.h",
12831326
+ "src/node_http_parser_impl.h",
12841327
+ "src/node_http2.h",
12851328
+ "src/node_http2_state.h",
12861329
+ "src/node_i18n.h",
12871330
+ "src/node_internals.h",
12881331
+ "src/node_main_instance.h",
1332+
+ "src/node_mem.h",
1333+
+ "src/node_mem-inl.h",
12891334
+ "src/node_messaging.h",
12901335
+ "src/node_metadata.h",
12911336
+ "src/node_mutex.h",
@@ -1305,6 +1350,7 @@ index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1f
13051350
+ "src/node_url.h",
13061351
+ "src/node_version.h",
13071352
+ "src/node_v8_platform-inl.h",
1353+
+ "src/node_wasi.h",
13081354
+ "src/node_watchdog.h",
13091355
+ "src/node_worker.h",
13101356
+ "src/pipe_wrap.h",
@@ -1541,7 +1587,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
15411587
+ args = rebase_path(inputs + outputs, root_build_dir)
15421588
+}
15431589
diff --git a/src/node_version.h b/src/node_version.h
1544-
index 8a6fb55a5a3824b40d2c744a0ed1e8d84e6bbc4a..c68a60d7b0a818b25ce3bd44037d52abe57769f2 100644
1590+
index 489dff631e51d1e93ed79acc48e52d33cd9c66d1..3f7349a4fa77aaae258ed32f378384165260c5b0 100644
15451591
--- a/src/node_version.h
15461592
+++ b/src/node_version.h
15471593
@@ -89,7 +89,10 @@
@@ -1697,29 +1743,24 @@ index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..ab1a18a215cb7393310324c6dbcacc66
16971743
if 'false' == variables.get('node_shared_libuv'):
16981744
subdir_files('deps/uv/include', 'include/node/', action)
16991745
diff --git a/tools/js2c.py b/tools/js2c.py
1700-
index 1346b2a87046d3472577875c887b3b44a63280ed..752344d68c3f63b4c5e491b33d4576ed48f8b74f 100755
1746+
index 4594694a2cab0d878d86127a72714ed60c251b6e..9e9883129bed62c591d23f71d139514c5034ac8d 100755
17011747
--- a/tools/js2c.py
17021748
+++ b/tools/js2c.py
1703-
@@ -261,10 +261,18 @@ def NormalizeFileName(filename):
1704-
split = ['internal'] + split
1705-
else: # `lib/**/*.js` so drop the 'lib' part
1749+
@@ -130,6 +130,14 @@ def NormalizeFileName(filename):
17061750
split = split[1:]
1707-
+
17081751
if len(split):
17091752
filename = '/'.join(split)
1710-
- return os.path.splitext(filename)[0]
1711-
1753+
+
17121754
+ # Electron-specific: when driving the node build from Electron, we generate
17131755
+ # config.gypi in a separate directory and pass the absolute path to js2c.
17141756
+ # This overrides the absolute path so that the variable names in the
17151757
+ # generated C are as if it was in the root node directory.
17161758
+ if filename.endswith("/config.gypi"):
17171759
+ filename = "config.gypi"
17181760
+
1719-
+ return os.path.splitext(filename)[0]
1761+
return os.path.splitext(filename)[0]
1762+
17201763

1721-
def JS2C(source_files, target):
1722-
# Process input from all *macro.py files
17231764
diff --git a/tools/tar.py b/tools/tar.py
17241765
new file mode 100644
17251766
index 0000000000000000000000000000000000000000..eb697be25779db62c829aac45a509804e9fff331

patches/node/build_bring_back_node_with_ltcg_configuration.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ index f07e65f719a1a5939997dfcae7bc787ee6391f4d..f4d03a2fdfd47a4e6a71c7146d92ce7c
2323

2424
'node_tag%': '',
2525
@@ -240,6 +240,26 @@
26-
'cflags': [ '-fPIE' ],
27-
'ldflags': [ '-fPIE', '-pie' ]
26+
'cflags': [ '-fPIC' ],
27+
'ldflags': [ '-fPIC' ]
2828
}],
2929
+ ['node_with_ltcg=="true"', {
3030
+ 'msvs_settings': {

0 commit comments

Comments
 (0)