@@ -54,71 +54,11 @@ index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3f
5454 }
5555
5656 assert(!node_enable_inspector || node_use_openssl,
57- diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni
58- index 5d87f3c901ab509e534598ed1eb0796a96355b5e..3d7aa148678b2646b88fa7c32abec91791b02b82 100644
59- --- a/src/inspector/unofficial.gni
60- +++ b/src/inspector/unofficial.gni
61- @@ -13,7 +13,7 @@ template("inspector_gn_build") {
62- }
63-
64- node_gen_dir = get_label_info("../..", "target_gen_dir")
65- - protocol_tool_path = "../../tools/inspector_protocol"
66- + protocol_tool_path = "../../deps/inspector_protocol"
67-
68- gypi_values = exec_script(
69- "../../tools/gypi_to_gn.py",
70- @@ -35,6 +35,8 @@ template("inspector_gn_build") {
71- ]
72-
73- args = [
74- + "--inspector_protocol_dir",
75- + rebase_path(protocol_tool_path, root_build_dir),
76- "--jinja_dir",
77- # jinja is in third_party.
78- rebase_path("//third_party/", root_build_dir),
79- @@ -72,4 +74,37 @@ template("inspector_gn_build") {
80- outputs = [ "$node_gen_dir/src/{{source_name_part}}.json" ]
81- args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir)
82- }
83- +
84- + config("crdtp_config") {
85- + include_dirs = [ protocol_tool_path ]
86- + }
87- +
88- + static_library("crdtp") {
89- + public_configs = [ ":crdtp_config" ]
90- + sources = [
91- + "$protocol_tool_path/crdtp/cbor.cc",
92- + "$protocol_tool_path/crdtp/cbor.h",
93- + "$protocol_tool_path/crdtp/dispatch.cc",
94- + "$protocol_tool_path/crdtp/dispatch.h",
95- + "$protocol_tool_path/crdtp/error_support.cc",
96- + "$protocol_tool_path/crdtp/error_support.h",
97- + "$protocol_tool_path/crdtp/export.h",
98- + "$protocol_tool_path/crdtp/find_by_first.h",
99- + "$protocol_tool_path/crdtp/frontend_channel.h",
100- + "$protocol_tool_path/crdtp/glue.h",
101- + "$protocol_tool_path/crdtp/json.cc",
102- + "$protocol_tool_path/crdtp/json.h",
103- + "$protocol_tool_path/crdtp/parser_handler.h",
104- + "$protocol_tool_path/crdtp/protocol_core.cc",
105- + "$protocol_tool_path/crdtp/protocol_core.h",
106- + "$protocol_tool_path/crdtp/serializable.cc",
107- + "$protocol_tool_path/crdtp/serializable.h",
108- + "$protocol_tool_path/crdtp/span.cc",
109- + "$protocol_tool_path/crdtp/span.h",
110- + "$protocol_tool_path/crdtp/status.cc",
111- + "$protocol_tool_path/crdtp/status.h",
112- + "$protocol_tool_path/crdtp/json_platform.cc",
113- + "$protocol_tool_path/crdtp/json_platform.h",
114- + ]
115- + }
116- }
11757diff --git a/src/node_builtins.cc b/src/node_builtins.cc
118- index 894fd515202cc3a1f933c2bbc618dd09869ad904..4f1ed661e9c432f3b50f2e7e348ad9794ff773d0 100644
58+ index e85860de93dd5753dd4542ecee9f0888af93898a..04eab49c368c8f86837ed2c1384bf3c63e4bde24 100644
11959--- a/src/node_builtins.cc
12060+++ b/src/node_builtins.cc
121- @@ -781 ,6 +781 ,7 @@ void BuiltinLoader::RegisterExternalReferences(
61+ @@ -783 ,6 +783 ,7 @@ void BuiltinLoader::RegisterExternalReferences(
12262 registry->Register(GetNatives);
12363
12464 RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@@ -298,38 +238,53 @@ index 21992cbe894a880e3223c379326b62db22f2f12d..1296a5457422099035ba34f2b02624f2
298238 } // namespace js2c
299239 } // namespace node
300240diff --git a/tools/search_files.py b/tools/search_files.py
301- index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d1e877e03 100755
241+ index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd17a16c20b 100755
302242--- a/tools/search_files.py
303243+++ b/tools/search_files.py
304244@@ -14,6 +14,7 @@ if __name__ == '__main__':
305245 try:
306246 files = SearchFiles(*sys.argv[2:])
307247 files = [ os.path.relpath(x, sys.argv[1]) for x in files ]
308248+ files = [os.path.normpath(x).replace(os.sep, '/') for x in files]
309- print('\n'.join(files))
310- except Exception as e :
311- print(str(e))
249+ # Apply the same transform in SearchFiles after relpath
250+ if sys.platform == 'win32' :
251+ files = [ x.replace('\\', '/') for x in files ]
312252diff --git a/unofficial.gni b/unofficial.gni
313- index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5aeab1340d 100644
253+ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..672e97436d9220e8d5046b0c92025f50ae50a3d8 100644
314254--- a/unofficial.gni
315255+++ b/unofficial.gni
316- @@ -145,6 +145,7 @@ template("node_gn_build") {
256+ @@ -142,32 +142,39 @@ template("node_gn_build") {
257+ public_configs = [
258+ ":node_external_config",
259+ "deps/googletest:googletest_config",
260+ + ":zstd_include_config"
261+ ]
317262 public_deps = [
318263 "deps/ada",
319264 "deps/uv",
320265+ "//electron:electron_js2c",
321266 "deps/simdjson",
322267 "$node_v8_path",
323268 ]
324- @@ -156,7 +157,6 @@ template("node_gn_build") {
269+ deps = [
270+ ":run_node_js2c",
271+ - "deps/brotli",
272+ "deps/cares",
273+ "deps/histogram",
325274 "deps/llhttp",
326275 "deps/nbytes",
327276 "deps/nghttp2",
328277- "deps/ngtcp2",
329278 "deps/postject",
330279 "deps/sqlite",
331280 "deps/uvwasi",
332- @@ -165,7 +165,11 @@ template("node_gn_build") {
281+ - "deps/zstd",
282+ "//third_party/zlib",
283+ + "//third_party/brotli:dec",
284+ + "//third_party/brotli:enc",
285+ + "//third_party/zstd:decompress",
286+ + "//third_party/zstd:headers",
287+ "$node_simdutf_path",
333288 "$node_v8_path:v8_libplatform",
334289 ]
335290
@@ -341,7 +296,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
341296 "$target_gen_dir/node_javascript.cc",
342297 ] + gypi_values.node_sources
343298
344- @@ -185,11 +189,12 @@ template("node_gn_build") {
299+ @@ -190,7 +197,7 @@ template("node_gn_build") {
345300 }
346301 if (node_use_openssl) {
347302 deps += [ "deps/ncrypto" ]
@@ -350,20 +305,26 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
350305 sources += gypi_values.node_crypto_sources
351306 }
352307 if (node_enable_inspector) {
353- deps += [
354- + "src/inspector:crdtp",
355- "src/inspector:node_protocol_generated_sources",
356- "src/inspector:v8_inspector_compress_protocol_json",
357- ]
358- @@ -282,6 +287,7 @@ template("node_gn_build") {
308+ @@ -214,6 +221,10 @@ template("node_gn_build") {
309+ }
310+ }
311+
312+ + config("zstd_include_config") {
313+ + include_dirs = [ "//third_party/zstd/src/lib" ]
314+ + }
315+ +
316+ executable(target_name) {
317+ forward_variables_from(invoker, "*")
318+
319+ @@ -288,6 +299,7 @@ template("node_gn_build") {
359320 }
360321
361322 executable("node_js2c") {
362323+ defines = []
363324 deps = [
364325 "deps/uv",
365326 "$node_simdutf_path",
366- @@ -292 ,26 +298 ,75 @@ template("node_gn_build") {
327+ @@ -298 ,26 +310 ,75 @@ template("node_gn_build") {
367328 "src/embedded_data.cc",
368329 "src/embedded_data.h",
369330 ]
@@ -449,7 +410,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5a
449410 outputs = [ "$target_gen_dir/node_javascript.cc" ]
450411
451412 # Get the path to node_js2c executable of the host toolchain.
452- @@ -325 ,11 +380 ,11 @@ template("node_gn_build") {
413+ @@ -331 ,11 +392 ,11 @@ template("node_gn_build") {
453414 get_label_info(":node_js2c($host_toolchain)", "name") +
454415 host_executable_suffix
455416
0 commit comments