@@ -7,20 +7,17 @@ This adds GN build files for Node, so we don't have to build with GYP.
77
88diff --git a/BUILD.gn b/BUILD.gn
99new file mode 100644
10- index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e30c77dd71
10+ index 0000000000000000000000000000000000000000..b5ea846fd9fd46f34dd4260b67282186fddbc0be
1111--- /dev/null
1212+++ b/BUILD.gn
13- @@ -0,0 +1,376 @@
13+ @@ -0,0 +1,360 @@
1414+ import("//electron/build/asar.gni")
1515+ import("//v8/gni/v8.gni")
1616+
1717+ declare_args() {
1818+ # Enable the V8 inspector protocol for use with node.
1919+ node_enable_inspector = true
2020+
21- + # Enable diagnostic reporting withing Node.js
22- + node_report = true
23- +
2421+ # Build node with SSL support.
2522+ # The variable is called "openssl" for parity with node's GYP build.
2623+ node_use_openssl = true
@@ -126,11 +123,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
126123+ } else {
127124+ defines += [ "NODE_USE_V8_PLATFORM=0" ]
128125+ }
129- + if (node_report) {
130- + defines += [ "NODE_REPORT=1" ]
131- + } else {
132- + defines += [ "NODE_REPORT=0" ]
133- + }
134126+ }
135127+
136128+ config("node_lib_config") {
@@ -217,7 +209,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
217209+ "deps/llhttp",
218210+ "deps/nghttp2",
219211+ "deps/uvwasi",
220- + "deps /zlib",
212+ + "//third_party /zlib",
221213+ "//third_party/brotli:dec",
222214+ "//third_party/brotli:enc",
223215+ "//v8:v8_libplatform",
@@ -262,14 +254,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
262254+ libs += [ "CoreFoundation.framework" ]
263255+ }
264256+
265- + if (node_report) {
266- + sources += [
267- + "src/node_report.cc",
268- + "src/node_report_module.cc",
269- + "src/node_report_utils.cc",
270- + ]
271- + }
272- +
273257+ if (node_enable_inspector) {
274258+ sources += [
275259+ "src/inspector_agent.cc",
@@ -291,7 +275,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
291275+ sources += [
292276+ "src/node_crypto.cc",
293277+ "src/node_crypto.h",
294- + "src/node_crypto_common.cc",
278+ + "src/node_crypto_common.cc",
295279+ "src/node_crypto_common.h",
296280+ "src/node_crypto_bio.cc",
297281+ "src/node_crypto_bio.h",
@@ -837,10 +821,10 @@ index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a
837821+ }
838822diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
839823new file mode 100644
840- index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c7128ab5eec
824+ index 0000000000000000000000000000000000000000..b1c2cb80193bd0a0c56867428f2da8b46f11b16b
841825--- /dev/null
842826+++ b/deps/uvwasi/BUILD.gn
843- @@ -0,0 +1,35 @@
827+ @@ -0,0 +1,36 @@
844828+ config("uvwasi_config") {
845829+ include_dirs = [ "include" ]
846830+ }
@@ -862,7 +846,7 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
862846+ deps = [ "../../deps/uv" ]
863847+
864848+ public_configs = [ ":uvwasi_config" ]
865- +
849+ +
866850+ cflags_c = []
867851+ if (!is_win) {
868852+ cflags_c += [ "-fvisibility=hidden" ]
@@ -871,81 +855,18 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
871855+ sources = [
872856+ "src/clocks.c",
873857+ "src/fd_table.c",
858+ + "src/path_resolver.c",
874859+ "src/uv_mapping.c",
875860+ "src/uvwasi.c",
876861+ "src/wasi_rights.c",
877862+ ]
878863+ }
879- diff --git a/deps/zlib/BUILD.gn b/deps/zlib/BUILD.gn
880- new file mode 100644
881- index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2eaaea76280
882- --- /dev/null
883- +++ b/deps/zlib/BUILD.gn
884- @@ -0,0 +1,58 @@
885- + config("includes") {
886- + include_dirs = [ "." ]
887- + }
888- +
889- + config("ignored_warnings") {
890- + if (is_win) {
891- + cflags = [
892- + "/wd4131", # old-style declarator
893- + "/wd4127", # conditional expression is constant
894- + "/wd4244", # possible loss of data on type conversion
895- + "/wd4996", # deprecated 'open'
896- + ]
897- + } else {
898- + cflags = [
899- + "-Wno-implicit-function-declaration",
900- + "-Wno-shift-negative-value",
901- + ]
902- + }
903- + }
904- +
905- + source_set("zlib") {
906- + sources = [
907- + "adler32.c",
908- + "compress.c",
909- + "crc32.c",
910- + "crc32.h",
911- + "deflate.c",
912- + "deflate.h",
913- + "gzclose.c",
914- + "gzguts.h",
915- + "gzlib.c",
916- + "gzread.c",
917- + "gzwrite.c",
918- + "infback.c",
919- + "inffast.c",
920- + "inffast.h",
921- + "inffixed.h",
922- + "inflate.c",
923- + "inflate.h",
924- + "inftrees.c",
925- + "inftrees.h",
926- + "trees.c",
927- + "trees.h",
928- + "uncompr.c",
929- + "zconf.h",
930- + "zlib.h",
931- + "zutil.c",
932- + "zutil.h",
933- + ]
934- +
935- + if (is_win) {
936- + defines = [ "ZLIB_DLL" ]
937- + }
938- +
939- + configs += [ ":ignored_warnings" ]
940- +
941- + public_configs = [ ":includes" ]
942- + }
943864diff --git a/filenames.json b/filenames.json
944865new file mode 100644
945- index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf1520b376e7e
866+ index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068ba0f8e69
946867--- /dev/null
947868+++ b/filenames.json
948- @@ -0,0 +1,500 @@
869+ @@ -0,0 +1,513 @@
949870+ // This file is automatically generated by generate_gn_filenames_json.py
950871+ // DO NOT EDIT
951872+ {
@@ -1161,6 +1082,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
11611082+ "lib/internal/fs/utils.js",
11621083+ "lib/internal/fs/watchers.js",
11631084+ "lib/internal/http.js",
1085+ + "lib/internal/heap_utils.js",
11641086+ "lib/internal/histogram.js",
11651087+ "lib/internal/idna.js",
11661088+ "lib/internal/inspector_async_hook.js",
@@ -1235,6 +1157,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
12351157+ "lib/internal/vm/module.js",
12361158+ "lib/internal/worker.js",
12371159+ "lib/internal/worker/io.js",
1160+ + "lib/internal/watchdog.js",
12381161+ "lib/internal/streams/lazy_transform.js",
12391162+ "lib/internal/streams/async_iterator.js",
12401163+ "lib/internal/streams/buffer_list.js",
@@ -1291,6 +1214,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
12911214+ "src/js_native_api_v8.h",
12921215+ "src/js_native_api_v8_internals.h",
12931216+ "src/js_stream.cc",
1217+ + "src/json_utils.cc",
12941218+ "src/module_wrap.cc",
12951219+ "src/node.cc",
12961220+ "src/node_api.cc",
@@ -1322,7 +1246,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
13221246+ "src/node_process_events.cc",
13231247+ "src/node_process_methods.cc",
13241248+ "src/node_process_object.cc",
1249+ + "src/node_report.cc",
1250+ + "src/node_report_module.cc",
1251+ + "src/node_report_utils.cc",
13251252+ "src/node_serdes.cc",
1253+ + "src/node_sockaddr.cc",
13261254+ "src/node_stat_watcher.cc",
13271255+ "src/node_symbols.cc",
13281256+ "src/node_task_queue.cc",
@@ -1373,6 +1301,9 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
13731301+ "src/histogram-inl.h",
13741302+ "src/http_parser_adaptor.h",
13751303+ "src/js_stream.h",
1304+ + "src/json_utils.h",
1305+ + "src/large_pages/node_large_page.cc",
1306+ + "src/large_pages/node_large_page.h",
13761307+ "src/memory_tracker.h",
13771308+ "src/memory_tracker-inl.h",
13781309+ "src/module_wrap.h",
@@ -1408,8 +1339,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
14081339+ "src/node_perf_common.h",
14091340+ "src/node_platform.h",
14101341+ "src/node_process.h",
1342+ + "src/node_report.h",
14111343+ "src/node_revert.h",
14121344+ "src/node_root_certs.h",
1345+ + "src/node_sockaddr.h",
1346+ + "src/node_sockaddr-inl.h",
14131347+ "src/node_stat_watcher.h",
14141348+ "src/node_union_bytes.h",
14151349+ "src/node_url.h",
@@ -1652,7 +1586,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
16521586+ args = rebase_path(inputs + outputs, root_build_dir)
16531587+ }
16541588diff --git a/src/node_version.h b/src/node_version.h
1655- index 958519fbe4a83293f5c7bfabb310d3f15d319922..935ead39a1148c22f8c778df750e0c24ceafe909 100644
1589+ index 49d0f6f8a69b48b79556e36c54daae080a00386b..aa1563e93ee66f1c1a2c6840b3d020dc8f9cef68 100644
16561590--- a/src/node_version.h
16571591+++ b/src/node_version.h
16581592@@ -89,7 +89,10 @@
0 commit comments