* src/BUILD.gn
* src/inspector/BUILD.gn
* filenames.json
* deps/*/BUILD.gn
This commit is contained in:
Samuel Attard 2018-10-25 14:15:19 +11:00 коммит произвёл Nitish Sakhawalkar
Родитель 6871b64a14
Коммит 18000c698a
6 изменённых файлов: 352 добавлений и 266 удалений

Просмотреть файл

@ -24,9 +24,6 @@ declare_args() {
# Build with ETW support.
node_use_etw = false
# Build with performance counters.
node_use_perfctr = false
# Build JavaScript in lib/ with DCHECK macros.
node_debug_lib = false
@ -44,7 +41,6 @@ declare_args() {
assert(!node_use_dtrace, "node_use_dtrace not supported in GN")
assert(!node_use_etw, "node_use_etw not supported in GN")
assert(!node_use_perfctr, "node_use_perfctr not supported in GN")
assert(!node_enable_inspector || node_use_openssl,
"node_enable_inspector requires node_use_openssl")
@ -81,9 +77,6 @@ chdir_action("node_js2c") {
if (!node_use_dtrace && !node_use_etw) {
macro_inputs += [ "src/notrace_macros.py" ]
}
if (!node_use_perfctr) {
macro_inputs += [ "src/noperfctr_macros.py" ]
}
if (node_debug_lib) {
macro_inputs += [ "tools/nodcheck_macros.py" ]
} else {
@ -130,6 +123,7 @@ component("node_lib") {
":node_js2c",
"deps/cares",
"deps/http_parser",
"deps/llhttp",
"deps/nghttp2",
"deps/zlib",
"//v8:v8_libplatform",
@ -228,9 +222,7 @@ component("node_lib") {
"src/inspector_socket_server.cc",
"src/inspector_socket_server.h",
]
deps += [
"src/inspector",
]
deps += [ "src/inspector" ]
}
if (node_use_openssl) {
@ -240,17 +232,16 @@ component("node_lib") {
"src/node_crypto.h",
"src/node_crypto_bio.cc",
"src/node_crypto_bio.h",
"src/node_crypto_clienthello-inl.h",
"src/node_crypto_clienthello.cc",
"src/node_crypto_clienthello.h",
"src/node_crypto_groups.h",
"src/tls_wrap.cc",
"src/tls_wrap.h",
]
defines += [
"NODE_OPENSSL_SYSTEM_CERT_PATH=\"$node_openssl_system_ca_path\"",
"EVP_CTRL_AEAD_SET_IVLEN=EVP_CTRL_GCM_SET_IVLEN",
"EVP_CTRL_CCM_SET_TAG=EVP_CTRL_GCM_SET_TAG",
"EVP_CTRL_AEAD_GET_TAG=EVP_CTRL_GCM_GET_TAG",
"EVP_CTRL_AEAD_SET_TAG=EVP_CTRL_GCM_SET_TAG",
]
cflags_cc += [ "-Wno-sign-compare" ]
}
@ -270,7 +261,9 @@ header_groups = []
foreach(header_group, node_files.headers) {
copy("node_headers_${header_group_index}") {
sources = header_group.files
outputs = [ "$node_headers_dir/${header_group.dest_dir}/{{source_file_part}}" ]
outputs = [
"$node_headers_dir/${header_group.dest_dir}/{{source_file_part}}",
]
}
header_groups += [ ":node_headers_${header_group_index}" ]
header_group_index += 1
@ -288,37 +281,40 @@ copy("zlib_headers") {
copy("node_gypi_headers") {
deps = [
":generate_config_gypi"
":generate_config_gypi",
]
sources = [
"common.gypi",
"$target_gen_dir/config.gypi",
"common.gypi",
]
outputs = [
"$node_headers_dir/include/node/{{source_file_part}}"
"$node_headers_dir/include/node/{{source_file_part}}",
]
}
action("tar_headers") {
deps = [
":copy_headers"
":copy_headers",
]
outputs = [
"$root_gen_dir/node_headers.tar.gz"
"$root_gen_dir/node_headers.tar.gz",
]
script = "tools/tar.py"
args = [
rebase_path("$root_gen_dir/node_headers"),
rebase_path(outputs[0])
rebase_path(outputs[0]),
]
}
group("copy_headers") {
public_deps = header_groups + [ ":zlib_headers", ":node_gypi_headers" ]
public_deps = header_groups + [
":zlib_headers",
":node_gypi_headers",
]
}
group("headers") {
public_deps = [
":tar_headers"
":tar_headers",
]
}

1
deps/cares/BUILD.gn поставляемый
Просмотреть файл

@ -75,6 +75,7 @@ static_library("cares") {
"src/ares_strdup.c",
"src/ares_strdup.h",
"src/ares_strerror.c",
"src/ares_strsplit.c",
"src/ares_timeout.c",
"src/ares_version.c",
"src/ares_writev.c",

13
deps/llhttp/BUILD.gn поставляемый Normal file
Просмотреть файл

@ -0,0 +1,13 @@
config("llhttp_config") {
include_dirs = [ "include" ]
}
static_library("llhttp") {
include_dirs = [ "include" ]
public_configs = [ ":llhttp_config" ]
sources = [
"src/api.c",
"src/http.c",
"src/llhttp.c",
]
}

12
deps/uv/BUILD.gn поставляемый
Просмотреть файл

@ -54,20 +54,22 @@ static_library("uv") {
"include/uv/version.h",
"src/fs-poll.c",
"src/heap-inl.h",
"src/idna.c",
"src/idna.h",
"src/inet.c",
"src/queue.h",
"src/strscpy.c",
"src/strscpy.h",
"src/threadpool.c",
"src/timer.c",
"src/uv-common.c",
"src/uv-common.h",
"src/uv-data-getter-setters.c",
"src/version.c"
"src/version.c",
]
if (is_win) {
defines += [
"_GNU_SOURCE",
]
defines += [ "_GNU_SOURCE" ]
sources += [
"include/uv/win.h",
"src/win/async.c",
@ -89,7 +91,6 @@ static_library("uv") {
"src/win/process-stdio.c",
"src/win/process.c",
"src/win/req-inl.h",
"src/win/req.c",
"src/win/signal.c",
"src/win/snprintf.c",
"src/win/stream-inl.h",
@ -134,6 +135,7 @@ static_library("uv") {
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/process.c",
"src/unix/pthread-fixes.c",
"src/unix/signal.c",
"src/unix/spinlock.h",
"src/unix/stream.c",

Просмотреть файл

@ -10,14 +10,15 @@
"src/node_api_types.h",
"src/node_buffer.h",
"src/node_object_wrap.h",
"src/node_version.h"
"src/node_version.h",
"src/js_native_api.h",
"src/js_native_api_types.h"
]
},
{
"dest_dir": "include/node//",
"files": [
"//v8/include/v8-inspector-protocol.h",
"//v8/include/v8-inspector.h",
"//v8/include/v8-internal.h",
"//v8/include/v8-platform.h",
"//v8/include/v8-profiler.h",
"//v8/include/v8-testing.h",
@ -48,7 +49,6 @@
"deps/uv/include/uv/linux.h",
"deps/uv/include/uv/os390.h",
"deps/uv/include/uv/posix.h",
"deps/uv/include/uv/pthread-barrier.h",
"deps/uv/include/uv/stdint-msvc2008.h",
"deps/uv/include/uv/sunos.h",
"deps/uv/include/uv/threadpool.h",
@ -66,18 +66,138 @@
}
],
"library_files": [
"lib/internal/per_context.js",
"lib/internal/bootstrap/cache.js",
"lib/internal/bootstrap/loaders.js",
"lib/internal/bootstrap/node.js",
"lib/async_hooks.js",
"lib/internal/cluster/child.js",
"lib/internal/cluster/master.js",
"lib/internal/cluster/round_robin_handle.js",
"lib/internal/cluster/shared_handle.js",
"lib/internal/cluster/utils.js",
"lib/internal/cluster/worker.js",
"lib/internal/console/constructor.js",
"lib/internal/console/global.js",
"lib/internal/console/inspector.js",
"lib/internal/crypto/certificate.js",
"lib/internal/crypto/cipher.js",
"lib/internal/crypto/diffiehellman.js",
"lib/internal/crypto/hash.js",
"lib/internal/crypto/keygen.js",
"lib/internal/crypto/pbkdf2.js",
"lib/internal/crypto/random.js",
"lib/internal/crypto/scrypt.js",
"lib/internal/crypto/sig.js",
"lib/internal/crypto/util.js",
"lib/internal/dns/promises.js",
"lib/internal/dns/utils.js",
"lib/internal/fs/promises.js",
"lib/internal/fs/read_file_context.js",
"lib/internal/fs/streams.js",
"lib/internal/fs/sync_write_stream.js",
"lib/internal/fs/utils.js",
"lib/internal/fs/watchers.js",
"lib/internal/http2/compat.js",
"lib/internal/http2/core.js",
"lib/internal/http2/util.js",
"lib/internal/modules/cjs/helpers.js",
"lib/internal/modules/cjs/loader.js",
"lib/internal/modules/esm/create_dynamic_module.js",
"lib/internal/modules/esm/default_resolve.js",
"lib/internal/modules/esm/loader.js",
"lib/internal/modules/esm/module_job.js",
"lib/internal/modules/esm/module_map.js",
"lib/internal/modules/esm/translators.js",
"lib/internal/process/coverage.js",
"lib/internal/process/esm_loader.js",
"lib/internal/process/main_thread_only.js",
"lib/internal/process/next_tick.js",
"lib/internal/process/per_thread.js",
"lib/internal/process/promises.js",
"lib/internal/process/stdio.js",
"lib/internal/process/warning.js",
"lib/internal/process/worker_thread_only.js",
"lib/internal/process/write-coverage.js",
"lib/internal/repl/await.js",
"lib/internal/repl/recoverable.js",
"lib/internal/streams/async_iterator.js",
"lib/internal/streams/buffer_list.js",
"lib/internal/streams/destroy.js",
"lib/internal/streams/duplexpair.js",
"lib/internal/streams/end-of-stream.js",
"lib/internal/streams/lazy_transform.js",
"lib/internal/streams/legacy.js",
"lib/internal/streams/pipeline.js",
"lib/internal/streams/state.js",
"lib/internal/test/binding.js",
"lib/internal/test/heap.js",
"lib/internal/test/unicode.js",
"lib/internal/util/comparisons.js",
"lib/internal/util/inspect.js",
"lib/internal/util/inspector.js",
"lib/internal/util/types.js",
"lib/internal/vm/source_text_module.js",
"lib/internal/assert.js",
"lib/internal/async_hooks.js",
"lib/internal/bash_completion.js",
"lib/internal/buffer.js",
"lib/internal/child_process.js",
"lib/internal/cli_table.js",
"lib/internal/constants.js",
"lib/internal/dgram.js",
"lib/internal/domexception.js",
"lib/internal/encoding.js",
"lib/internal/errors.js",
"lib/internal/error-serdes.js",
"lib/internal/fixed_queue.js",
"lib/internal/freelist.js",
"lib/internal/http.js",
"lib/internal/inspector_async_hook.js",
"lib/internal/linkedlist.js",
"lib/internal/net.js",
"lib/internal/options.js",
"lib/internal/per_context.js",
"lib/internal/print_help.js",
"lib/internal/priority_queue.js",
"lib/internal/querystring.js",
"lib/internal/queue_microtask.js",
"lib/internal/readline.js",
"lib/internal/repl.js",
"lib/internal/safe_globals.js",
"lib/internal/socket_list.js",
"lib/internal/stream_base_commons.js",
"lib/internal/timers.js",
"lib/internal/tls.js",
"lib/internal/trace_events_async_hooks.js",
"lib/internal/tty.js",
"lib/internal/url.js",
"lib/internal/util.js",
"lib/internal/v8_prof_polyfill.js",
"lib/internal/v8_prof_processor.js",
"lib/internal/validators.js",
"lib/internal/worker.js",
"lib/internal/wrap_js_stream.js",
"lib/_http_agent.js",
"lib/_http_client.js",
"lib/_http_common.js",
"lib/_http_incoming.js",
"lib/_http_outgoing.js",
"lib/_http_server.js",
"lib/_stream_duplex.js",
"lib/_stream_passthrough.js",
"lib/_stream_readable.js",
"lib/_stream_transform.js",
"lib/_stream_wrap.js",
"lib/_stream_writable.js",
"lib/_tls_common.js",
"lib/_tls_wrap.js",
"lib/assert.js",
"lib/async_hooks.js",
"lib/buffer.js",
"lib/child_process.js",
"lib/cluster.js",
"lib/console.js",
"lib/constants.js",
"lib/crypto.js",
"lib/cluster.js",
"lib/dgram.js",
"lib/dns.js",
"lib/domain.js",
@ -85,12 +205,6 @@
"lib/fs.js",
"lib/http.js",
"lib/http2.js",
"lib/_http_agent.js",
"lib/_http_client.js",
"lib/_http_common.js",
"lib/_http_incoming.js",
"lib/_http_outgoing.js",
"lib/_http_server.js",
"lib/https.js",
"lib/inspector.js",
"lib/module.js",
@ -104,18 +218,10 @@
"lib/readline.js",
"lib/repl.js",
"lib/stream.js",
"lib/_stream_readable.js",
"lib/_stream_writable.js",
"lib/_stream_duplex.js",
"lib/_stream_transform.js",
"lib/_stream_passthrough.js",
"lib/_stream_wrap.js",
"lib/string_decoder.js",
"lib/sys.js",
"lib/timers.js",
"lib/tls.js",
"lib/_tls_common.js",
"lib/_tls_wrap.js",
"lib/trace_events.js",
"lib/tty.js",
"lib/url.js",
@ -124,103 +230,6 @@
"lib/vm.js",
"lib/worker_threads.js",
"lib/zlib.js",
"lib/internal/assert.js",
"lib/internal/async_hooks.js",
"lib/internal/buffer.js",
"lib/internal/cli_table.js",
"lib/internal/child_process.js",
"lib/internal/cluster/child.js",
"lib/internal/cluster/master.js",
"lib/internal/cluster/round_robin_handle.js",
"lib/internal/cluster/shared_handle.js",
"lib/internal/cluster/utils.js",
"lib/internal/cluster/worker.js",
"lib/internal/crypto/certificate.js",
"lib/internal/crypto/cipher.js",
"lib/internal/crypto/diffiehellman.js",
"lib/internal/crypto/hash.js",
"lib/internal/crypto/pbkdf2.js",
"lib/internal/crypto/random.js",
"lib/internal/crypto/scrypt.js",
"lib/internal/crypto/sig.js",
"lib/internal/crypto/util.js",
"lib/internal/constants.js",
"lib/internal/dgram.js",
"lib/internal/dns/promises.js",
"lib/internal/dns/utils.js",
"lib/internal/domexception.js",
"lib/internal/encoding.js",
"lib/internal/errors.js",
"lib/internal/error-serdes.js",
"lib/internal/fixed_queue.js",
"lib/internal/freelist.js",
"lib/internal/fs/promises.js",
"lib/internal/fs/read_file_context.js",
"lib/internal/fs/streams.js",
"lib/internal/fs/sync_write_stream.js",
"lib/internal/fs/utils.js",
"lib/internal/fs/watchers.js",
"lib/internal/http.js",
"lib/internal/inspector_async_hook.js",
"lib/internal/linkedlist.js",
"lib/internal/modules/cjs/helpers.js",
"lib/internal/modules/cjs/loader.js",
"lib/internal/modules/esm/loader.js",
"lib/internal/modules/esm/create_dynamic_module.js",
"lib/internal/modules/esm/default_resolve.js",
"lib/internal/modules/esm/module_job.js",
"lib/internal/modules/esm/module_map.js",
"lib/internal/modules/esm/translators.js",
"lib/internal/safe_globals.js",
"lib/internal/net.js",
"lib/internal/print_help.js",
"lib/internal/process/esm_loader.js",
"lib/internal/process/main_thread_only.js",
"lib/internal/process/next_tick.js",
"lib/internal/process/per_thread.js",
"lib/internal/process/promises.js",
"lib/internal/process/stdio.js",
"lib/internal/process/warning.js",
"lib/internal/process/worker_thread_only.js",
"lib/internal/querystring.js",
"lib/internal/process/write-coverage.js",
"lib/internal/process/coverage.js",
"lib/internal/readline.js",
"lib/internal/repl.js",
"lib/internal/repl/await.js",
"lib/internal/repl/recoverable.js",
"lib/internal/socket_list.js",
"lib/internal/test/binding.js",
"lib/internal/test/heap.js",
"lib/internal/test/unicode.js",
"lib/internal/timers.js",
"lib/internal/tls.js",
"lib/internal/trace_events_async_hooks.js",
"lib/internal/tty.js",
"lib/internal/url.js",
"lib/internal/util.js",
"lib/internal/util/comparisons.js",
"lib/internal/util/inspector.js",
"lib/internal/util/types.js",
"lib/internal/http2/core.js",
"lib/internal/http2/compat.js",
"lib/internal/http2/util.js",
"lib/internal/v8_prof_polyfill.js",
"lib/internal/v8_prof_processor.js",
"lib/internal/validators.js",
"lib/internal/stream_base_commons.js",
"lib/internal/vm/source_text_module.js",
"lib/internal/worker.js",
"lib/internal/streams/lazy_transform.js",
"lib/internal/streams/async_iterator.js",
"lib/internal/streams/buffer_list.js",
"lib/internal/streams/duplexpair.js",
"lib/internal/streams/legacy.js",
"lib/internal/streams/destroy.js",
"lib/internal/streams/state.js",
"lib/internal/streams/pipeline.js",
"lib/internal/streams/end-of-stream.js",
"lib/internal/wrap_js_stream.js",
"deps/v8/tools/splaytree.js",
"deps/v8/tools/codemap.js",
"deps/v8/tools/consarray.js",
@ -239,135 +248,158 @@
"deps/acorn/dist/walk.js"
],
"node_sources": [
"src/async_wrap.cc",
"src/bootstrapper.cc",
"src/callback_scope.cc",
"src/cares_wrap.cc",
"src/connection_wrap.cc",
"src/connect_wrap.cc",
"src/debug_utils.cc",
"src/env.cc",
"src/exceptions.cc",
"src/fs_event_wrap.cc",
"src/handle_wrap.cc",
"src/heap_utils.cc",
"src/js_stream.cc",
"src/module_wrap.cc",
"src/node.cc",
"src/node_api.cc",
"src/node_api.h",
"src/node_api_types.h",
"src/node_buffer.cc",
"src/node_config.cc",
"src/node_constants.cc",
"src/node_contextify.cc",
"src/node_domain.cc",
"src/node_encoding.cc",
"src/node_errors.h",
"src/node_file.cc",
"src/node_http2.cc",
"src/node_http_parser.cc",
"src/node_messaging.cc",
"src/node_options.cc",
"src/node_os.cc",
"src/node_platform.cc",
"src/node_perf.cc",
"src/node_postmortem_metadata.cc",
"src/node_process.cc",
"src/node_serdes.cc",
"src/node_trace_events.cc",
"src/node_types.cc",
"src/node_url.cc",
"src/node_util.cc",
"src/node_v8.cc",
"src/node_stat_watcher.cc",
"src/node_watchdog.cc",
"src/node_worker.cc",
"src/node_zlib.cc",
"src/node_i18n.cc",
"src/pipe_wrap.cc",
"src/process_wrap.cc",
"src/sharedarraybuffer_metadata.cc",
"src/signal_wrap.cc",
"src/spawn_sync.cc",
"src/string_bytes.cc",
"src/string_decoder.cc",
"src/stream_base.cc",
"src/stream_pipe.cc",
"src/stream_wrap.cc",
"src/tcp_wrap.cc",
"src/timer_wrap.cc",
"src/tracing/agent.cc",
"src/tracing/node_trace_buffer.cc",
"src/tracing/node_trace_writer.cc",
"src/tracing/trace_event.cc",
"src/tracing/traced_value.cc",
"src/tty_wrap.cc",
"src/udp_wrap.cc",
"src/util.cc",
"src/uv.cc",
"src/aliased_buffer.h",
"src/async_wrap.cc",
"src/async_wrap.h",
"src/async_wrap-inl.h",
"src/base_object.h",
"src/base_object-inl.h",
"src/connection_wrap.h",
"src/base64.h",
"src/bootstrapper.cc",
"src/callback_scope.cc",
"src/cares_wrap.cc",
"src/connect_wrap.cc",
"src/connect_wrap.h",
"src/connection_wrap.cc",
"src/connection_wrap.h",
"src/debug_utils.cc",
"src/debug_utils.h",
"src/env.cc",
"src/env.h",
"src/env-inl.h",
"src/exceptions.cc",
"src/fs_event_wrap.cc",
"src/handle_wrap.cc",
"src/handle_wrap.h",
"src/heap_utils.cc",
"src/http_parser_adaptor.h",
"src/js_native_api.h",
"src/js_native_api_types.h",
"src/js_native_api_v8.cc",
"src/js_native_api_v8.h",
"src/js_native_api_v8_internals.h",
"src/js_stream.cc",
"src/js_stream.h",
"src/module_wrap.h",
"src/node.h",
"src/node_buffer.h",
"src/node_code_cache.h",
"src/node_constants.h",
"src/node_contextify.h",
"src/node_file.h",
"src/node_http2.h",
"src/node_http2_state.h",
"src/node_internals.h",
"src/node_javascript.h",
"src/node_messaging.h",
"src/node_mutex.h",
"src/node_options.h",
"src/node_options-inl.h",
"src/node_perf.h",
"src/node_perf_common.h",
"src/node_persistent.h",
"src/node_platform.h",
"src/node_root_certs.h",
"src/node_version.h",
"src/node_watchdog.h",
"src/node_wrap.h",
"src/node_revert.h",
"src/node_i18n.h",
"src/node_worker.h",
"src/memory_tracker.h",
"src/memory_tracker-inl.h",
"src/module_wrap.cc",
"src/module_wrap.h",
"src/node_api.cc",
"src/node_api.h",
"src/node_api_types.h",
"src/node_binding.cc",
"src/node_binding.h",
"src/node_buffer.cc",
"src/node_buffer.h",
"src/node_config.cc",
"src/node_constants.cc",
"src/node_constants.h",
"src/node_context_data.h",
"src/node_contextify.cc",
"src/node_contextify.h",
"src/node_credentials.cc",
"src/node_domain.cc",
"src/node_encoding.cc",
"src/node_env_var.cc",
"src/node_errors.cc",
"src/node_errors.h",
"src/node_file.cc",
"src/node_file.h",
"src/node_http_parser_impl.h",
"src/node_http_parser_llhttp.cc",
"src/node_http_parser_traditional.cc",
"src/node_http2_state.h",
"src/node_http2.cc",
"src/node_http2.h",
"src/node_i18n.cc",
"src/node_i18n.h",
"src/node_internals.h",
"src/node_main.cc",
"src/node_messaging.cc",
"src/node_messaging.h",
"src/node_metadata.cc",
"src/node_metadata.h",
"src/node_mutex.h",
"src/node_native_module.cc",
"src/node_native_module.h",
"src/node_object_wrap.h",
"src/node_options.cc",
"src/node_options.h",
"src/node_options-inl.h",
"src/node_os.cc",
"src/node_perf.cc",
"src/node_pref.h",
"src/node_pref_common.h",
"src/node_persistent.h",
"src/node_platform.cc",
"src/node_platform.h",
"src/node_postmortem_metadata.cc",
"src/node_process.cc",
"src/node_revert.h",
"src/node_root_certs.h",
"src/node_serdes.cc",
"src/node_stat_watcher.cc",
"src/node_stat_watcher.h",
"src/node_trace_events.cc",
"src/node_types.cc",
"src/node_union_bytes.h",
"src/node_url.cc",
"src/node_url.h",
"src/node_util.cc",
"src/node_v8.cc",
"src/node_version.h",
"src/node_watchdog.cc",
"src/node_watchdog.h",
"src/node_worker.cc",
"src/node_worker.h",
"src/node_zlib.cc",
"src/node.cc",
"src/node.h",
"src/pipe_wrap.cc",
"src/pipe_wrap.h",
"src/tty_wrap.h",
"src/tcp_wrap.h",
"src/udp_wrap.h",
"src/process_wrap.cc",
"src/req_wrap.h",
"src/req_wrap-inl.h",
"src/sharedarraybuffer_metadata.cc",
"src/sharedarraybuffer_metadata.h",
"src/string_bytes.h",
"src/string_decoder.h",
"src/string_decoder-inl.h",
"src/signal_wrap.cc",
"src/spawn_sync.cc",
"src/spawn_sync.h",
"src/stream_base.cc",
"src/stream_base.h",
"src/stream_base-inl.h",
"src/stream_pipe.cc",
"src/stream_pipe.h",
"src/stream_wrap.cc",
"src/stream_wrap.h",
"src/tracing/agent.h",
"src/tracing/node_trace_buffer.h",
"src/tracing/node_trace_writer.h",
"src/tracing/trace_event.h",
"src/tracing/traced_value.h",
"src/string_bytes.cc",
"src/string_bytes.h",
"src/string_decoder.cc",
"src/string_decoder.h",
"src/string_decoder-inl.h",
"src/string_search.h",
"src/tcp_wrap.cc",
"src/tcp_wrap.h",
"src/timers.cc",
"src/tty_wrap.cc",
"src/tty_wrap.h",
"src/udp_wrap.cc",
"src/udp_wrap.h",
"src/util.cc",
"src/util.h",
"src/util-inl.h",
"deps/http_parser/http_parser.h",
"deps/v8/include/v8.h"
"src/uv.cc",
"src/v8abbr.h",
"src/tracing/agent.cc",
"src/tracing/agent.h",
"src/tracing/node_trace_buffer.cc",
"src/tracing/node_trace_buffer.h",
"src/tracing/node_trace_writer.cc",
"src/tracing/node_trace_writer.h",
"src/tracing/trace_event.cc",
"src/tracing/trace_event.h",
"src/tracing/traced_event_common.h",
"src/tracing/traced_value.cc",
"src/tracing/traced_value.h"
]
}

Просмотреть файл

@ -1,12 +1,13 @@
import("//v8/gni/v8.gni")
_inspector_protocol = v8_path_prefix + "/third_party/inspector_protocol"
import("$_inspector_protocol/inspector_protocol.gni")
inspector_protocol_dir = "../../tools/inspector_protocol"
_protocol_generated = [
"protocol/Forward.h",
"protocol/Protocol.cpp",
"protocol/Protocol.h",
"protocol/NodeWorker.cpp",
"protocol/NodeWorker.h",
"protocol/NodeTracing.cpp",
"protocol/NodeTracing.h",
]
@ -36,6 +37,10 @@ source_set("inspector") {
"node_string.h",
"tracing_agent.cc",
"tracing_agent.h",
"worker_agent.cc",
"worker_agent.h",
"worker_inspector.cc",
"worker_inspector.h",
]
sources += rebase_path(_protocol_generated,
".",
@ -61,24 +66,61 @@ source_set("inspector") {
public_configs = [ ":inspector_config" ]
}
inspector_protocol_generate("protocol_generated_sources") {
# This based on the template from //v8/../inspector_protocol.gni
action("protocol_generated_sources") {
# This is to ensure that the output directory exists--the code generator
# doesn't create it.
write_file("$target_gen_dir/$inspector_protocol_package/.dummy", "")
deps = [
":node_protocol_json",
":node_protocol_config",
script = "$inspector_protocol_dir/CodeGenerator.py"
inputs = [
"$target_gen_dir/node_protocol_config.json",
"$target_gen_dir/node_protocol.json",
"$inspector_protocol_dir/lib/Allocator_h.template",
"$inspector_protocol_dir/lib/Array_h.template",
"$inspector_protocol_dir/lib/Collections_h.template",
"$inspector_protocol_dir/lib/DispatcherBase_cpp.template",
"$inspector_protocol_dir/lib/DispatcherBase_h.template",
"$inspector_protocol_dir/lib/ErrorSupport_cpp.template",
"$inspector_protocol_dir/lib/ErrorSupport_h.template",
"$inspector_protocol_dir/lib/Forward_h.template",
"$inspector_protocol_dir/lib/FrontendChannel_h.template",
"$inspector_protocol_dir/lib/Maybe_h.template",
"$inspector_protocol_dir/lib/Object_cpp.template",
"$inspector_protocol_dir/lib/Object_h.template",
"$inspector_protocol_dir/lib/Parser_cpp.template",
"$inspector_protocol_dir/lib/Parser_h.template",
"$inspector_protocol_dir/lib/Protocol_cpp.template",
"$inspector_protocol_dir/lib/ValueConversions_h.template",
"$inspector_protocol_dir/lib/Values_cpp.template",
"$inspector_protocol_dir/lib/Values_h.template",
"$inspector_protocol_dir/templates/Exported_h.template",
"$inspector_protocol_dir/templates/Imported_h.template",
"$inspector_protocol_dir/templates/TypeBuilder_cpp.template",
"$inspector_protocol_dir/templates/TypeBuilder_h.template",
]
inspector_protocol_dir = _inspector_protocol
out_dir = "$target_gen_dir/src"
config_file = "$target_gen_dir/node_protocol_config.json"
inputs = [
"$target_gen_dir/node_protocol.json",
deps = [
":node_protocol_config",
":node_protocol_json",
]
args = [
"--jinja_dir",
rebase_path("//third_party/", root_build_dir), # jinja is in chromium's third_party
"--output_base",
rebase_path("$target_gen_dir/src", root_build_dir),
"--config",
rebase_path("$target_gen_dir/node_protocol_config.json", root_build_dir),
]
outputs =
rebase_path(_protocol_generated, ".", "$inspector_protocol_output/..")
get_path_info(rebase_path(rebase_path(_protocol_generated,
".",
"$inspector_protocol_output/.."),
".",
"$target_gen_dir/src"),
"abspath")
}
template("generate_protocol_json") {
@ -103,10 +145,10 @@ template("generate_protocol_json") {
copy("node_protocol_config") {
sources = [
"node_protocol_config.json"
"node_protocol_config.json",
]
outputs = [
"$target_gen_dir/{{source_file_part}}"
"$target_gen_dir/{{source_file_part}}",
]
}