@@ -7,20 +7,17 @@ This adds GN build files for Node, so we don't have to build with GYP.
7
7
8
8
diff --git a/BUILD.gn b/BUILD.gn
9
9
new file mode 100644
10
- index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e30c77dd71
10
+ index 0000000000000000000000000000000000000000..b5ea846fd9fd46f34dd4260b67282186fddbc0be
11
11
--- /dev/null
12
12
+++ b/BUILD.gn
13
- @@ -0,0 +1,376 @@
13
+ @@ -0,0 +1,360 @@
14
14
+ import("//electron/build/asar.gni")
15
15
+ import("//v8/gni/v8.gni")
16
16
+
17
17
+ declare_args() {
18
18
+ # Enable the V8 inspector protocol for use with node.
19
19
+ node_enable_inspector = true
20
20
+
21
- + # Enable diagnostic reporting withing Node.js
22
- + node_report = true
23
- +
24
21
+ # Build node with SSL support.
25
22
+ # The variable is called "openssl" for parity with node's GYP build.
26
23
+ node_use_openssl = true
@@ -126,11 +123,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
126
123
+ } else {
127
124
+ defines += [ "NODE_USE_V8_PLATFORM=0" ]
128
125
+ }
129
- + if (node_report) {
130
- + defines += [ "NODE_REPORT=1" ]
131
- + } else {
132
- + defines += [ "NODE_REPORT=0" ]
133
- + }
134
126
+ }
135
127
+
136
128
+ config("node_lib_config") {
@@ -217,7 +209,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
217
209
+ "deps/llhttp",
218
210
+ "deps/nghttp2",
219
211
+ "deps/uvwasi",
220
- + "deps /zlib",
212
+ + "//third_party /zlib",
221
213
+ "//third_party/brotli:dec",
222
214
+ "//third_party/brotli:enc",
223
215
+ "//v8:v8_libplatform",
@@ -262,14 +254,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
262
254
+ libs += [ "CoreFoundation.framework" ]
263
255
+ }
264
256
+
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
- +
273
257
+ if (node_enable_inspector) {
274
258
+ sources += [
275
259
+ "src/inspector_agent.cc",
@@ -291,7 +275,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
291
275
+ sources += [
292
276
+ "src/node_crypto.cc",
293
277
+ "src/node_crypto.h",
294
- + "src/node_crypto_common.cc",
278
+ + "src/node_crypto_common.cc",
295
279
+ "src/node_crypto_common.h",
296
280
+ "src/node_crypto_bio.cc",
297
281
+ "src/node_crypto_bio.h",
@@ -837,10 +821,10 @@ index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a
837
821
+ }
838
822
diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
839
823
new file mode 100644
840
- index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c7128ab5eec
824
+ index 0000000000000000000000000000000000000000..b1c2cb80193bd0a0c56867428f2da8b46f11b16b
841
825
--- /dev/null
842
826
+++ b/deps/uvwasi/BUILD.gn
843
- @@ -0,0 +1,35 @@
827
+ @@ -0,0 +1,36 @@
844
828
+ config("uvwasi_config") {
845
829
+ include_dirs = [ "include" ]
846
830
+ }
@@ -862,7 +846,7 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
862
846
+ deps = [ "../../deps/uv" ]
863
847
+
864
848
+ public_configs = [ ":uvwasi_config" ]
865
- +
849
+ +
866
850
+ cflags_c = []
867
851
+ if (!is_win) {
868
852
+ cflags_c += [ "-fvisibility=hidden" ]
@@ -871,81 +855,18 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
871
855
+ sources = [
872
856
+ "src/clocks.c",
873
857
+ "src/fd_table.c",
858
+ + "src/path_resolver.c",
874
859
+ "src/uv_mapping.c",
875
860
+ "src/uvwasi.c",
876
861
+ "src/wasi_rights.c",
877
862
+ ]
878
863
+ }
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
- + }
943
864
diff --git a/filenames.json b/filenames.json
944
865
new file mode 100644
945
- index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf1520b376e7e
866
+ index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068ba0f8e69
946
867
--- /dev/null
947
868
+++ b/filenames.json
948
- @@ -0,0 +1,500 @@
869
+ @@ -0,0 +1,513 @@
949
870
+ // This file is automatically generated by generate_gn_filenames_json.py
950
871
+ // DO NOT EDIT
951
872
+ {
@@ -1161,6 +1082,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1161
1082
+ "lib/internal/fs/utils.js",
1162
1083
+ "lib/internal/fs/watchers.js",
1163
1084
+ "lib/internal/http.js",
1085
+ + "lib/internal/heap_utils.js",
1164
1086
+ "lib/internal/histogram.js",
1165
1087
+ "lib/internal/idna.js",
1166
1088
+ "lib/internal/inspector_async_hook.js",
@@ -1235,6 +1157,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1235
1157
+ "lib/internal/vm/module.js",
1236
1158
+ "lib/internal/worker.js",
1237
1159
+ "lib/internal/worker/io.js",
1160
+ + "lib/internal/watchdog.js",
1238
1161
+ "lib/internal/streams/lazy_transform.js",
1239
1162
+ "lib/internal/streams/async_iterator.js",
1240
1163
+ "lib/internal/streams/buffer_list.js",
@@ -1291,6 +1214,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1291
1214
+ "src/js_native_api_v8.h",
1292
1215
+ "src/js_native_api_v8_internals.h",
1293
1216
+ "src/js_stream.cc",
1217
+ + "src/json_utils.cc",
1294
1218
+ "src/module_wrap.cc",
1295
1219
+ "src/node.cc",
1296
1220
+ "src/node_api.cc",
@@ -1322,7 +1246,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1322
1246
+ "src/node_process_events.cc",
1323
1247
+ "src/node_process_methods.cc",
1324
1248
+ "src/node_process_object.cc",
1249
+ + "src/node_report.cc",
1250
+ + "src/node_report_module.cc",
1251
+ + "src/node_report_utils.cc",
1325
1252
+ "src/node_serdes.cc",
1253
+ + "src/node_sockaddr.cc",
1326
1254
+ "src/node_stat_watcher.cc",
1327
1255
+ "src/node_symbols.cc",
1328
1256
+ "src/node_task_queue.cc",
@@ -1373,6 +1301,9 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1373
1301
+ "src/histogram-inl.h",
1374
1302
+ "src/http_parser_adaptor.h",
1375
1303
+ "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",
1376
1307
+ "src/memory_tracker.h",
1377
1308
+ "src/memory_tracker-inl.h",
1378
1309
+ "src/module_wrap.h",
@@ -1408,8 +1339,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
1408
1339
+ "src/node_perf_common.h",
1409
1340
+ "src/node_platform.h",
1410
1341
+ "src/node_process.h",
1342
+ + "src/node_report.h",
1411
1343
+ "src/node_revert.h",
1412
1344
+ "src/node_root_certs.h",
1345
+ + "src/node_sockaddr.h",
1346
+ + "src/node_sockaddr-inl.h",
1413
1347
+ "src/node_stat_watcher.h",
1414
1348
+ "src/node_union_bytes.h",
1415
1349
+ "src/node_url.h",
@@ -1652,7 +1586,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
1652
1586
+ args = rebase_path(inputs + outputs, root_build_dir)
1653
1587
+ }
1654
1588
diff --git a/src/node_version.h b/src/node_version.h
1655
- index 958519fbe4a83293f5c7bfabb310d3f15d319922..935ead39a1148c22f8c778df750e0c24ceafe909 100644
1589
+ index 49d0f6f8a69b48b79556e36c54daae080a00386b..aa1563e93ee66f1c1a2c6840b3d020dc8f9cef68 100644
1656
1590
--- a/src/node_version.h
1657
1591
+++ b/src/node_version.h
1658
1592
@@ -89,7 +89,10 @@
0 commit comments