@@ -21,27 +21,6 @@ index d6909b95886f4de3f0b953c2a2992f69066b7434..972955f9144aafcd3a3fe278b7aaad40
21
21
+ cflags_c = [ "-Wdeprecated-literal-operator" ]
22
22
}
23
23
}
24
- diff --git a/deps/sqlite/unofficial.gni b/deps/sqlite/unofficial.gni
25
- index ebb3ffcd6d42b4c16b6865a91ccf4428cffe864b..00225afa1fb4205f1e02d9f185aeb97d642b3fd9 100644
26
- --- a/deps/sqlite/unofficial.gni
27
- +++ b/deps/sqlite/unofficial.gni
28
- @@ -18,8 +18,14 @@ template("sqlite_gn_build") {
29
- forward_variables_from(invoker, "*")
30
- public_configs = [ ":sqlite_config" ]
31
- sources = gypi_values.sqlite_sources
32
- + cflags_c = [
33
- + "-Wno-implicit-fallthrough",
34
- + "-Wno-unreachable-code-break",
35
- + "-Wno-unreachable-code-return",
36
- + "-Wno-unreachable-code",
37
- + ]
38
- if (is_win) {
39
- - cflags_c = [
40
- + cflags_c += [
41
- "-Wno-sign-compare",
42
- "-Wno-unused-but-set-variable",
43
- "-Wno-unused-function",
44
- diff --git a/node.gni b/node.gni
45
24
index 9dca810decebd75aab427e306b3cc37c80fb55c9..852f64fa9cfb50fe6e9ce7aa46be336d3196d5b8 100644
46
25
--- a/node.gni
47
26
+++ b/node.gni
@@ -52,13 +31,13 @@ index 9dca810decebd75aab427e306b3cc37c80fb55c9..852f64fa9cfb50fe6e9ce7aa46be336d
52
31
- node_path = "//node"
53
32
+ node_path = "//third_party/electron_node"
54
33
55
- # The location of V8, use the one from node's deps by default.
34
+ # The location of V8 - use the one from node's deps by default.
56
35
- node_v8_path = "$node_path/deps/v8"
57
36
+ node_v8_path = "//v8"
58
37
59
- # The NODE_MODULE_VERSION defined in node_version.h .
60
- node_module_version = exec_script( "$node_path/tools/getmoduleversion.py", [], "value")
61
- @@ -38 ,7 +38 ,7 @@ declare_args() {
38
+ # The location of OpenSSL - use the one from node's deps by default .
39
+ node_openssl_path = "$node_path/deps/openssl"
40
+ @@ -44 ,7 +44 ,7 @@ declare_args() {
62
41
node_openssl_system_ca_path = ""
63
42
64
43
# Initialize v8 platform during node.js startup.
@@ -67,15 +46,15 @@ index 9dca810decebd75aab427e306b3cc37c80fb55c9..852f64fa9cfb50fe6e9ce7aa46be336d
67
46
68
47
# Custom build tag.
69
48
node_tag = ""
70
- @@ -58,7 +58 ,16 @@ declare_args() {
49
+ @@ -64,10 +64 ,16 @@ declare_args() {
71
50
# TODO(zcbenz): There are few broken things for now:
72
51
# 1. cross-os compilation is not supported.
73
52
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
74
53
- node_use_node_snapshot = (host_os == target_os) && !(host_cpu == "arm64" && target_cpu == "x64")
75
54
+ node_use_node_snapshot = false
76
- +
77
- + # Build with Amaro (TypeScript utils).
78
- + node_use_amaro = true
55
+
56
+ # Build with Amaro (TypeScript utils).
57
+ node_use_amaro = true
79
58
+
80
59
+ # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries.
81
60
+ use_system_cares = false
@@ -98,39 +77,18 @@ index 1bec44f6f29b0b652e92d2bb336fdb74b85eee30..599b59873dbb17ae5e7463403859e088
98
77
99
78
} // namespace builtins
100
79
diff --git a/src/node_builtins.h b/src/node_builtins.h
101
- index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834e118ffcf 100644
80
+ index a73de23a1debfdac66873e0baccf882e383bfc36..7ac5291be093773ee7efd39e77e01bf5d5ce5247 100644
102
81
--- a/src/node_builtins.h
103
82
+++ b/src/node_builtins.h
104
83
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =
105
- // Generated by tools/js2c.py as node_javascript.cc
84
+ // Generated by tools/js2c.cc as node_javascript.cc
106
85
void RegisterExternalReferencesForInternalizedBuiltinCode(
107
86
ExternalReferenceRegistry* registry);
108
87
+ void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode(
109
88
+ ExternalReferenceRegistry* registry);
110
89
111
90
// Handles compilation and caching of built-in JavaScript modules and
112
91
// bootstrap scripts, whose source are bundled into the binary as static data.
113
- diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py
114
- index 45b3ac5006140fb55aad0e6b78084b753a947a76..35cce2ea8fd85f21582962115ac455918d4c4553 100755
115
- --- a/tools/generate_config_gypi.py
116
- +++ b/tools/generate_config_gypi.py
117
- @@ -21,7 +21,7 @@ import getnapibuildversion
118
- GN_RE = re.compile(r'(\w+)\s+=\s+(.*?)$', re.MULTILINE)
119
-
120
- if sys.platform == 'win32':
121
- - GN = 'gn.exe'
122
- + GN = 'gn.bat'
123
- else:
124
- GN = 'gn'
125
-
126
- @@ -65,6 +65,7 @@ def translate_config(out_dir, config, v8_config):
127
- eval(config['node_builtin_shareable_builtins']),
128
- 'node_module_version': int(config['node_module_version']),
129
- 'node_use_openssl': config['node_use_openssl'],
130
- + 'node_use_amaro': config['node_use_amaro'],
131
- 'node_use_node_code_cache': config['node_use_node_code_cache'],
132
- 'node_use_node_snapshot': config['node_use_node_snapshot'],
133
- 'v8_enable_inspector': # this is actually a node misnomer
134
92
diff --git a/tools/install.py b/tools/install.py
135
93
index bf54249b66c0d4e179deaae5a9fd55568e694fe0..31b94d2e4b532d3b8202b512e2d2f41d29a2a546 100755
136
94
--- a/tools/install.py
@@ -305,18 +263,6 @@ diff --git a/unofficial.gni b/unofficial.gni
305
263
index c3b311e4a7f5444b07d4d7028d4621806959804e..f6793b8bf22d6ac911a1977edaa881b6dbbe7ac7 100644
306
264
--- a/unofficial.gni
307
265
+++ b/unofficial.gni
308
- @@ -22,6 +22,11 @@ template("node_gn_build") {
309
- } else {
310
- defines += [ "HAVE_OPENSSL=0" ]
311
- }
312
- + if (node_use_amaro) {
313
- + defines += [ "HAVE_AMARO=1" ]
314
- + } else {
315
- + defines += [ "HAVE_AMARO=0" ]
316
- + }
317
- if (node_use_v8_platform) {
318
- defines += [ "NODE_USE_V8_PLATFORM=1" ]
319
- } else {
320
266
@@ -139,6 +144,7 @@ template("node_gn_build") {
321
267
public_deps = [
322
268
"deps/ada",
@@ -325,14 +271,16 @@ index c3b311e4a7f5444b07d4d7028d4621806959804e..f6793b8bf22d6ac911a1977edaa881b6
325
271
"deps/simdjson",
326
272
"$node_v8_path",
327
273
]
328
- @@ -150,7 +156,6 @@ template("node_gn_build") {
274
+ --- a/unofficial.gni
275
+ +++ b/unofficial.gni
276
+ @@ -156,7 +156,6 @@ template("node_gn_build") {
329
277
"deps/llhttp",
330
278
"deps/nbytes",
331
279
"deps/nghttp2",
332
280
- "deps/ngtcp2",
333
281
"deps/postject",
334
- "deps/simdutf",
335
282
"deps/sqlite",
283
+ "deps/uvwasi",
336
284
@@ -159,7 +164,11 @@ template("node_gn_build") {
337
285
"$node_v8_path:v8_libplatform",
338
286
]
@@ -345,27 +293,23 @@ index c3b311e4a7f5444b07d4d7028d4621806959804e..f6793b8bf22d6ac911a1977edaa881b6
345
293
"$target_gen_dir/node_javascript.cc",
346
294
] + gypi_values.node_sources
347
295
348
- @@ -178,8 +187,10 @@ template("node_gn_build") {
349
- deps += [ "//third_party/icu" ]
296
+ @@ -185,7 +185,7 @@ template("node_gn_build") {
350
297
}
351
298
if (node_use_openssl) {
352
- - deps += [ "deps/ncrypto" ]
353
- - public_deps += [ "deps/openssl" ]
354
- + deps += [
355
- + "deps/ncrypto",
356
- + "//third_party/boringssl"
357
- + ]
299
+ deps += [ "deps/ncrypto" ]
300
+ - public_deps += [ "$node_openssl_path" ]
301
+ + public_deps += [ "//third_party/boringssl" ]
358
302
sources += gypi_values.node_crypto_sources
359
303
}
360
304
if (node_enable_inspector) {
361
- @@ -276 ,6 +287 ,7 @@ template("node_gn_build") {
305
+ @@ -282 ,6 +282 ,7 @@ template("node_gn_build") {
362
306
}
363
307
364
308
executable("node_js2c") {
365
309
+ defines = []
366
310
deps = [
367
- "deps/simdutf",
368
311
"deps/uv",
312
+ "$node_simdutf_path",
369
313
@@ -286,26 +298,75 @@ template("node_gn_build") {
370
314
"src/embedded_data.cc",
371
315
"src/embedded_data.h",
0 commit comments