|
@@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
|
|
|
|
|
|
diff --git a/BUILD.gn b/BUILD.gn
|
|
|
new file mode 100644
|
|
|
-index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e30c77dd71
|
|
|
+index 0000000000000000000000000000000000000000..b5ea846fd9fd46f34dd4260b67282186fddbc0be
|
|
|
--- /dev/null
|
|
|
+++ b/BUILD.gn
|
|
|
-@@ -0,0 +1,376 @@
|
|
|
+@@ -0,0 +1,360 @@
|
|
|
+import("//electron/build/asar.gni")
|
|
|
+import("//v8/gni/v8.gni")
|
|
|
+
|
|
@@ -18,9 +18,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
|
|
|
+ # Enable the V8 inspector protocol for use with node.
|
|
|
+ node_enable_inspector = true
|
|
|
+
|
|
|
-+ # Enable diagnostic reporting withing Node.js
|
|
|
-+ node_report = true
|
|
|
-+
|
|
|
+ # Build node with SSL support.
|
|
|
+ # The variable is called "openssl" for parity with node's GYP build.
|
|
|
+ node_use_openssl = true
|
|
@@ -126,11 +123,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
|
|
|
+ } else {
|
|
|
+ defines += [ "NODE_USE_V8_PLATFORM=0" ]
|
|
|
+ }
|
|
|
-+ if (node_report) {
|
|
|
-+ defines += [ "NODE_REPORT=1" ]
|
|
|
-+ } else {
|
|
|
-+ defines += [ "NODE_REPORT=0" ]
|
|
|
-+ }
|
|
|
+}
|
|
|
+
|
|
|
+config("node_lib_config") {
|
|
@@ -217,7 +209,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
|
|
|
+ "deps/llhttp",
|
|
|
+ "deps/nghttp2",
|
|
|
+ "deps/uvwasi",
|
|
|
-+ "deps/zlib",
|
|
|
++ "//third_party/zlib",
|
|
|
+ "//third_party/brotli:dec",
|
|
|
+ "//third_party/brotli:enc",
|
|
|
+ "//v8:v8_libplatform",
|
|
@@ -262,14 +254,6 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
|
|
|
+ libs += [ "CoreFoundation.framework" ]
|
|
|
+ }
|
|
|
+
|
|
|
-+ if (node_report) {
|
|
|
-+ sources += [
|
|
|
-+ "src/node_report.cc",
|
|
|
-+ "src/node_report_module.cc",
|
|
|
-+ "src/node_report_utils.cc",
|
|
|
-+ ]
|
|
|
-+ }
|
|
|
-+
|
|
|
+ if (node_enable_inspector) {
|
|
|
+ sources += [
|
|
|
+ "src/inspector_agent.cc",
|
|
@@ -291,7 +275,7 @@ index 0000000000000000000000000000000000000000..2d8952a1d23af0ab4b3e5de0e56ec1e3
|
|
|
+ sources += [
|
|
|
+ "src/node_crypto.cc",
|
|
|
+ "src/node_crypto.h",
|
|
|
-+ "src/node_crypto_common.cc",
|
|
|
++ "src/node_crypto_common.cc",
|
|
|
+ "src/node_crypto_common.h",
|
|
|
+ "src/node_crypto_bio.cc",
|
|
|
+ "src/node_crypto_bio.h",
|
|
@@ -837,10 +821,10 @@ index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a
|
|
|
+}
|
|
|
diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn
|
|
|
new file mode 100644
|
|
|
-index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c7128ab5eec
|
|
|
+index 0000000000000000000000000000000000000000..b1c2cb80193bd0a0c56867428f2da8b46f11b16b
|
|
|
--- /dev/null
|
|
|
+++ b/deps/uvwasi/BUILD.gn
|
|
|
-@@ -0,0 +1,35 @@
|
|
|
+@@ -0,0 +1,36 @@
|
|
|
+config("uvwasi_config") {
|
|
|
+ include_dirs = [ "include" ]
|
|
|
+}
|
|
@@ -862,7 +846,7 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
|
|
|
+ deps = [ "../../deps/uv" ]
|
|
|
+
|
|
|
+ public_configs = [ ":uvwasi_config" ]
|
|
|
-+
|
|
|
++
|
|
|
+ cflags_c = []
|
|
|
+ if (!is_win) {
|
|
|
+ cflags_c += [ "-fvisibility=hidden" ]
|
|
@@ -871,81 +855,18 @@ index 0000000000000000000000000000000000000000..6df1a603d5b2887e22e8e2863bb04c71
|
|
|
+ sources = [
|
|
|
+ "src/clocks.c",
|
|
|
+ "src/fd_table.c",
|
|
|
++ "src/path_resolver.c",
|
|
|
+ "src/uv_mapping.c",
|
|
|
+ "src/uvwasi.c",
|
|
|
+ "src/wasi_rights.c",
|
|
|
+ ]
|
|
|
+}
|
|
|
-diff --git a/deps/zlib/BUILD.gn b/deps/zlib/BUILD.gn
|
|
|
-new file mode 100644
|
|
|
-index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2eaaea76280
|
|
|
---- /dev/null
|
|
|
-+++ b/deps/zlib/BUILD.gn
|
|
|
-@@ -0,0 +1,58 @@
|
|
|
-+config("includes") {
|
|
|
-+ include_dirs = [ "." ]
|
|
|
-+}
|
|
|
-+
|
|
|
-+config("ignored_warnings") {
|
|
|
-+ if (is_win) {
|
|
|
-+ cflags = [
|
|
|
-+ "/wd4131", # old-style declarator
|
|
|
-+ "/wd4127", # conditional expression is constant
|
|
|
-+ "/wd4244", # possible loss of data on type conversion
|
|
|
-+ "/wd4996", # deprecated 'open'
|
|
|
-+ ]
|
|
|
-+ } else {
|
|
|
-+ cflags = [
|
|
|
-+ "-Wno-implicit-function-declaration",
|
|
|
-+ "-Wno-shift-negative-value",
|
|
|
-+ ]
|
|
|
-+ }
|
|
|
-+}
|
|
|
-+
|
|
|
-+source_set("zlib") {
|
|
|
-+ sources = [
|
|
|
-+ "adler32.c",
|
|
|
-+ "compress.c",
|
|
|
-+ "crc32.c",
|
|
|
-+ "crc32.h",
|
|
|
-+ "deflate.c",
|
|
|
-+ "deflate.h",
|
|
|
-+ "gzclose.c",
|
|
|
-+ "gzguts.h",
|
|
|
-+ "gzlib.c",
|
|
|
-+ "gzread.c",
|
|
|
-+ "gzwrite.c",
|
|
|
-+ "infback.c",
|
|
|
-+ "inffast.c",
|
|
|
-+ "inffast.h",
|
|
|
-+ "inffixed.h",
|
|
|
-+ "inflate.c",
|
|
|
-+ "inflate.h",
|
|
|
-+ "inftrees.c",
|
|
|
-+ "inftrees.h",
|
|
|
-+ "trees.c",
|
|
|
-+ "trees.h",
|
|
|
-+ "uncompr.c",
|
|
|
-+ "zconf.h",
|
|
|
-+ "zlib.h",
|
|
|
-+ "zutil.c",
|
|
|
-+ "zutil.h",
|
|
|
-+ ]
|
|
|
-+
|
|
|
-+ if (is_win) {
|
|
|
-+ defines = [ "ZLIB_DLL" ]
|
|
|
-+ }
|
|
|
-+
|
|
|
-+ configs += [ ":ignored_warnings" ]
|
|
|
-+
|
|
|
-+ public_configs = [ ":includes" ]
|
|
|
-+}
|
|
|
diff --git a/filenames.json b/filenames.json
|
|
|
new file mode 100644
|
|
|
-index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf1520b376e7e
|
|
|
+index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068ba0f8e69
|
|
|
--- /dev/null
|
|
|
+++ b/filenames.json
|
|
|
-@@ -0,0 +1,500 @@
|
|
|
+@@ -0,0 +1,513 @@
|
|
|
+// This file is automatically generated by generate_gn_filenames_json.py
|
|
|
+// DO NOT EDIT
|
|
|
+{
|
|
@@ -1161,6 +1082,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "lib/internal/fs/utils.js",
|
|
|
+ "lib/internal/fs/watchers.js",
|
|
|
+ "lib/internal/http.js",
|
|
|
++ "lib/internal/heap_utils.js",
|
|
|
+ "lib/internal/histogram.js",
|
|
|
+ "lib/internal/idna.js",
|
|
|
+ "lib/internal/inspector_async_hook.js",
|
|
@@ -1235,6 +1157,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "lib/internal/vm/module.js",
|
|
|
+ "lib/internal/worker.js",
|
|
|
+ "lib/internal/worker/io.js",
|
|
|
++ "lib/internal/watchdog.js",
|
|
|
+ "lib/internal/streams/lazy_transform.js",
|
|
|
+ "lib/internal/streams/async_iterator.js",
|
|
|
+ "lib/internal/streams/buffer_list.js",
|
|
@@ -1291,6 +1214,7 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "src/js_native_api_v8.h",
|
|
|
+ "src/js_native_api_v8_internals.h",
|
|
|
+ "src/js_stream.cc",
|
|
|
++ "src/json_utils.cc",
|
|
|
+ "src/module_wrap.cc",
|
|
|
+ "src/node.cc",
|
|
|
+ "src/node_api.cc",
|
|
@@ -1322,7 +1246,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "src/node_process_events.cc",
|
|
|
+ "src/node_process_methods.cc",
|
|
|
+ "src/node_process_object.cc",
|
|
|
++ "src/node_report.cc",
|
|
|
++ "src/node_report_module.cc",
|
|
|
++ "src/node_report_utils.cc",
|
|
|
+ "src/node_serdes.cc",
|
|
|
++ "src/node_sockaddr.cc",
|
|
|
+ "src/node_stat_watcher.cc",
|
|
|
+ "src/node_symbols.cc",
|
|
|
+ "src/node_task_queue.cc",
|
|
@@ -1373,6 +1301,9 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "src/histogram-inl.h",
|
|
|
+ "src/http_parser_adaptor.h",
|
|
|
+ "src/js_stream.h",
|
|
|
++ "src/json_utils.h",
|
|
|
++ "src/large_pages/node_large_page.cc",
|
|
|
++ "src/large_pages/node_large_page.h",
|
|
|
+ "src/memory_tracker.h",
|
|
|
+ "src/memory_tracker-inl.h",
|
|
|
+ "src/module_wrap.h",
|
|
@@ -1408,8 +1339,11 @@ index 0000000000000000000000000000000000000000..c94fb6b3c4483b0b9270dcf582cdf152
|
|
|
+ "src/node_perf_common.h",
|
|
|
+ "src/node_platform.h",
|
|
|
+ "src/node_process.h",
|
|
|
++ "src/node_report.h",
|
|
|
+ "src/node_revert.h",
|
|
|
+ "src/node_root_certs.h",
|
|
|
++ "src/node_sockaddr.h",
|
|
|
++ "src/node_sockaddr-inl.h",
|
|
|
+ "src/node_stat_watcher.h",
|
|
|
+ "src/node_union_bytes.h",
|
|
|
+ "src/node_url.h",
|
|
@@ -1652,7 +1586,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
|
|
|
+ args = rebase_path(inputs + outputs, root_build_dir)
|
|
|
+}
|
|
|
diff --git a/src/node_version.h b/src/node_version.h
|
|
|
-index 958519fbe4a83293f5c7bfabb310d3f15d319922..935ead39a1148c22f8c778df750e0c24ceafe909 100644
|
|
|
+index 49d0f6f8a69b48b79556e36c54daae080a00386b..aa1563e93ee66f1c1a2c6840b3d020dc8f9cef68 100644
|
|
|
--- a/src/node_version.h
|
|
|
+++ b/src/node_version.h
|
|
|
@@ -89,7 +89,10 @@
|