2011-08-04 04:01:30 +04:00
|
|
|
{
|
2011-08-04 10:36:27 +04:00
|
|
|
'variables': {
|
2019-01-25 22:03:36 +03:00
|
|
|
'v8_use_siphash%': 0,
|
|
|
|
'v8_use_snapshot%': 0,
|
2017-07-01 03:08:32 +03:00
|
|
|
'v8_trace_maps%': 0,
|
2012-03-28 21:26:10 +04:00
|
|
|
'node_use_dtrace%': 'false',
|
2012-06-12 03:23:17 +04:00
|
|
|
'node_use_etw%': 'false',
|
2016-03-23 04:05:54 +03:00
|
|
|
'node_no_browser_globals%': 'false',
|
2018-06-18 20:02:57 +03:00
|
|
|
'node_code_cache_path%': '',
|
2016-03-27 03:17:55 +03:00
|
|
|
'node_use_v8_platform%': 'true',
|
|
|
|
'node_use_bundled_v8%': 'true',
|
|
|
|
'node_shared%': 'false',
|
2016-06-29 23:03:18 +03:00
|
|
|
'force_dynamic_crt%': 0,
|
2016-03-27 03:17:55 +03:00
|
|
|
'node_module_version%': '',
|
2018-11-27 04:16:34 +03:00
|
|
|
'node_shared_brotli%': 'false',
|
2012-02-27 03:02:21 +04:00
|
|
|
'node_shared_zlib%': 'false',
|
2012-10-23 17:01:26 +04:00
|
|
|
'node_shared_http_parser%': 'false',
|
2016-03-18 01:25:17 +03:00
|
|
|
'node_shared_cares%': 'false',
|
2012-10-24 03:54:22 +04:00
|
|
|
'node_shared_libuv%': 'false',
|
2017-11-06 11:59:01 +03:00
|
|
|
'node_shared_nghttp2%': 'false',
|
2011-09-05 03:01:53 +04:00
|
|
|
'node_use_openssl%': 'true',
|
2012-06-21 00:31:49 +04:00
|
|
|
'node_shared_openssl%': 'false',
|
2014-03-27 00:30:49 +04:00
|
|
|
'node_v8_options%': '',
|
2015-10-21 19:24:12 +03:00
|
|
|
'node_enable_v8_vtunejit%': 'false',
|
2015-09-29 17:22:00 +03:00
|
|
|
'node_core_target_name%': 'node',
|
2017-12-05 03:07:53 +03:00
|
|
|
'node_lib_target_name%': 'node_lib',
|
|
|
|
'node_intermediate_lib_type%': 'static_library',
|
2011-09-05 03:01:53 +04:00
|
|
|
'library_files': [
|
2019-01-30 17:21:07 +03:00
|
|
|
'lib/internal/bootstrap/primordials.js',
|
2018-06-18 20:02:57 +03:00
|
|
|
'lib/internal/bootstrap/cache.js',
|
2018-03-06 17:42:32 +03:00
|
|
|
'lib/internal/bootstrap/loaders.js',
|
|
|
|
'lib/internal/bootstrap/node.js',
|
2019-01-15 18:12:21 +03:00
|
|
|
'lib/internal/bootstrap/pre_execution.js',
|
2019-03-07 17:12:52 +03:00
|
|
|
'lib/internal/per_context/setup.js',
|
2019-03-07 17:45:31 +03:00
|
|
|
'lib/internal/per_context/domexception.js',
|
2017-03-10 02:13:34 +03:00
|
|
|
'lib/async_hooks.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/assert.js',
|
|
|
|
'lib/buffer.js',
|
2011-10-12 00:16:33 +04:00
|
|
|
'lib/child_process.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/console.js',
|
|
|
|
'lib/constants.js',
|
|
|
|
'lib/crypto.js',
|
2011-10-13 01:51:25 +04:00
|
|
|
'lib/cluster.js',
|
2011-10-12 00:26:41 +04:00
|
|
|
'lib/dgram.js',
|
2011-10-12 00:21:30 +04:00
|
|
|
'lib/dns.js',
|
2012-04-07 03:26:18 +04:00
|
|
|
'lib/domain.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/events.js',
|
|
|
|
'lib/fs.js',
|
|
|
|
'lib/http.js',
|
http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.
This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.
This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.
Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.
The JS API is defined within `internal/http2/*.js`.
There are two APIs provided: Core and Compat.
The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.
The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.
Tests, documentation and initial benchmarks are included.
The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.
When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.
To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.
Additional configuration options to enable verbose debugging are provided:
```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```
The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.
The following illustrates as simple HTTP/2 server and client interaction:
(The HTTP/2 client and server support both plain text and TLS connections)
```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
client.destroy();
});
// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
stream.respond({ ':status': 200 });
stream.write('hello ');
stream.end('world');
});
server.listen(80);
```
```js
const http2 = require('http2');
const client = http2.connect('http://localhost');
```
Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-17 20:17:16 +03:00
|
|
|
'lib/http2.js',
|
2013-04-12 01:47:15 +04:00
|
|
|
'lib/_http_agent.js',
|
2013-04-12 03:11:12 +04:00
|
|
|
'lib/_http_client.js',
|
2013-04-12 02:15:41 +04:00
|
|
|
'lib/_http_common.js',
|
2013-04-12 02:00:45 +04:00
|
|
|
'lib/_http_incoming.js',
|
2013-04-12 02:37:14 +04:00
|
|
|
'lib/_http_outgoing.js',
|
2013-04-12 03:00:19 +04:00
|
|
|
'lib/_http_server.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/https.js',
|
2016-12-13 04:08:31 +03:00
|
|
|
'lib/inspector.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/module.js',
|
2011-10-12 00:07:14 +04:00
|
|
|
'lib/net.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/os.js',
|
|
|
|
'lib/path.js',
|
2017-08-08 01:53:24 +03:00
|
|
|
'lib/perf_hooks.js',
|
2014-12-31 01:25:52 +03:00
|
|
|
'lib/process.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/punycode.js',
|
|
|
|
'lib/querystring.js',
|
|
|
|
'lib/readline.js',
|
|
|
|
'lib/repl.js',
|
|
|
|
'lib/stream.js',
|
2012-10-03 02:44:50 +04:00
|
|
|
'lib/_stream_readable.js',
|
|
|
|
'lib/_stream_writable.js',
|
|
|
|
'lib/_stream_duplex.js',
|
|
|
|
'lib/_stream_transform.js',
|
|
|
|
'lib/_stream_passthrough.js',
|
2015-02-23 23:09:44 +03:00
|
|
|
'lib/_stream_wrap.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/string_decoder.js',
|
|
|
|
'lib/sys.js',
|
2011-10-12 00:07:14 +04:00
|
|
|
'lib/timers.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/tls.js',
|
2014-03-07 03:27:01 +04:00
|
|
|
'lib/_tls_common.js',
|
2013-06-13 17:36:00 +04:00
|
|
|
'lib/_tls_wrap.js',
|
2018-04-04 04:05:33 +03:00
|
|
|
'lib/trace_events.js',
|
2011-10-12 00:41:33 +04:00
|
|
|
'lib/tty.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/url.js',
|
|
|
|
'lib/util.js',
|
2014-12-10 00:57:48 +03:00
|
|
|
'lib/v8.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
'lib/vm.js',
|
2018-06-01 16:13:43 +03:00
|
|
|
'lib/worker_threads.js',
|
2011-09-07 03:13:05 +04:00
|
|
|
'lib/zlib.js',
|
2019-02-06 08:05:24 +03:00
|
|
|
'lib/internal/assert.js',
|
2019-02-06 07:46:35 +03:00
|
|
|
'lib/internal/assert/assertion_error.js',
|
2017-11-12 20:46:55 +03:00
|
|
|
'lib/internal/async_hooks.js',
|
2016-10-12 00:12:31 +03:00
|
|
|
'lib/internal/buffer.js',
|
2018-01-13 22:55:19 +03:00
|
|
|
'lib/internal/cli_table.js',
|
2015-05-22 17:52:05 +03:00
|
|
|
'lib/internal/child_process.js',
|
2017-01-11 23:30:55 +03:00
|
|
|
'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',
|
2018-11-29 01:17:57 +03:00
|
|
|
'lib/internal/console/constructor.js',
|
|
|
|
'lib/internal/console/global.js',
|
2017-09-06 18:10:34 +03:00
|
|
|
'lib/internal/crypto/certificate.js',
|
|
|
|
'lib/internal/crypto/cipher.js',
|
|
|
|
'lib/internal/crypto/diffiehellman.js',
|
|
|
|
'lib/internal/crypto/hash.js',
|
2018-09-02 18:00:01 +03:00
|
|
|
'lib/internal/crypto/keygen.js',
|
2018-09-20 20:53:44 +03:00
|
|
|
'lib/internal/crypto/keys.js',
|
2017-09-06 18:10:34 +03:00
|
|
|
'lib/internal/crypto/pbkdf2.js',
|
|
|
|
'lib/internal/crypto/random.js',
|
2018-05-18 12:05:20 +03:00
|
|
|
'lib/internal/crypto/scrypt.js',
|
2017-09-06 18:10:34 +03:00
|
|
|
'lib/internal/crypto/sig.js',
|
|
|
|
'lib/internal/crypto/util.js',
|
2018-02-08 20:14:41 +03:00
|
|
|
'lib/internal/constants.js',
|
2018-07-21 07:56:12 +03:00
|
|
|
'lib/internal/dgram.js',
|
2018-06-11 21:56:33 +03:00
|
|
|
'lib/internal/dns/promises.js',
|
|
|
|
'lib/internal/dns/utils.js',
|
2019-03-09 11:28:04 +03:00
|
|
|
'lib/internal/dtrace.js',
|
2017-06-12 18:25:53 +03:00
|
|
|
'lib/internal/encoding.js',
|
2016-10-24 23:09:34 +03:00
|
|
|
'lib/internal/errors.js',
|
2017-09-26 02:42:16 +03:00
|
|
|
'lib/internal/error-serdes.js',
|
2018-05-02 16:39:08 +03:00
|
|
|
'lib/internal/fixed_queue.js',
|
2015-02-14 22:53:34 +03:00
|
|
|
'lib/internal/freelist.js',
|
2019-01-24 21:56:33 +03:00
|
|
|
'lib/internal/freeze_intrinsics.js',
|
2018-05-03 21:40:48 +03:00
|
|
|
'lib/internal/fs/promises.js',
|
2018-05-15 22:34:49 +03:00
|
|
|
'lib/internal/fs/read_file_context.js',
|
|
|
|
'lib/internal/fs/streams.js',
|
|
|
|
'lib/internal/fs/sync_write_stream.js',
|
2018-05-03 21:40:48 +03:00
|
|
|
'lib/internal/fs/utils.js',
|
2018-05-15 22:34:49 +03:00
|
|
|
'lib/internal/fs/watchers.js',
|
2017-03-06 05:13:09 +03:00
|
|
|
'lib/internal/http.js',
|
2018-10-10 21:23:48 +03:00
|
|
|
'lib/internal/idna.js',
|
2017-07-17 17:51:26 +03:00
|
|
|
'lib/internal/inspector_async_hook.js',
|
2018-12-20 01:14:57 +03:00
|
|
|
'lib/internal/js_stream_socket.js',
|
2015-09-27 00:27:36 +03:00
|
|
|
'lib/internal/linkedlist.js',
|
2019-01-15 18:12:21 +03:00
|
|
|
'lib/internal/main/check_syntax.js',
|
|
|
|
'lib/internal/main/eval_string.js',
|
|
|
|
'lib/internal/main/eval_stdin.js',
|
|
|
|
'lib/internal/main/inspect.js',
|
|
|
|
'lib/internal/main/print_bash_completion.js',
|
|
|
|
'lib/internal/main/print_help.js',
|
|
|
|
'lib/internal/main/prof_process.js',
|
|
|
|
'lib/internal/main/repl.js',
|
|
|
|
'lib/internal/main/run_main_module.js',
|
|
|
|
'lib/internal/main/run_third_party_main.js',
|
|
|
|
'lib/internal/main/worker_thread.js',
|
2018-03-06 21:30:18 +03:00
|
|
|
'lib/internal/modules/cjs/helpers.js',
|
|
|
|
'lib/internal/modules/cjs/loader.js',
|
2018-03-23 17:32:23 +03:00
|
|
|
'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',
|
2016-01-26 17:12:41 +03:00
|
|
|
'lib/internal/net.js',
|
2018-11-04 23:52:50 +03:00
|
|
|
'lib/internal/options.js',
|
2018-09-13 22:27:12 +03:00
|
|
|
'lib/internal/policy/manifest.js',
|
2019-01-15 18:12:21 +03:00
|
|
|
'lib/internal/policy/sri.js',
|
2018-05-05 11:09:44 +03:00
|
|
|
'lib/internal/priority_queue.js',
|
2018-03-06 21:30:18 +03:00
|
|
|
'lib/internal/process/esm_loader.js',
|
2018-12-23 06:42:28 +03:00
|
|
|
'lib/internal/process/execution.js',
|
2018-06-17 19:40:58 +03:00
|
|
|
'lib/internal/process/main_thread_only.js',
|
|
|
|
'lib/internal/process/per_thread.js',
|
2018-09-13 22:27:12 +03:00
|
|
|
'lib/internal/process/policy.js',
|
2016-03-15 23:13:52 +03:00
|
|
|
'lib/internal/process/promises.js',
|
|
|
|
'lib/internal/process/stdio.js',
|
2016-01-20 22:38:35 +03:00
|
|
|
'lib/internal/process/warning.js',
|
2018-06-17 19:40:58 +03:00
|
|
|
'lib/internal/process/worker_thread_only.js',
|
2018-09-05 17:06:59 +03:00
|
|
|
'lib/internal/process/report.js',
|
2019-03-08 18:28:19 +03:00
|
|
|
'lib/internal/process/task_queues.js',
|
2019-03-08 11:34:46 +03:00
|
|
|
'lib/internal/profiler.js',
|
2017-02-04 09:06:04 +03:00
|
|
|
'lib/internal/querystring.js',
|
2015-11-16 22:09:26 +03:00
|
|
|
'lib/internal/readline.js',
|
2015-04-23 10:35:53 +03:00
|
|
|
'lib/internal/repl.js',
|
2017-09-23 10:10:47 +03:00
|
|
|
'lib/internal/repl/await.js',
|
2019-02-01 20:49:16 +03:00
|
|
|
'lib/internal/repl/history.js',
|
2019-01-19 17:34:00 +03:00
|
|
|
'lib/internal/repl/utils.js',
|
2015-09-27 00:27:36 +03:00
|
|
|
'lib/internal/socket_list.js',
|
2018-02-10 18:36:55 +03:00
|
|
|
'lib/internal/test/binding.js',
|
2017-02-04 00:05:59 +03:00
|
|
|
'lib/internal/timers.js',
|
2017-09-08 10:58:54 +03:00
|
|
|
'lib/internal/tls.js',
|
2017-07-18 02:47:12 +03:00
|
|
|
'lib/internal/trace_events_async_hooks.js',
|
2018-04-01 12:27:01 +03:00
|
|
|
'lib/internal/tty.js',
|
2016-05-31 21:52:19 +03:00
|
|
|
'lib/internal/url.js',
|
2015-05-28 17:01:56 +03:00
|
|
|
'lib/internal/util.js',
|
2017-10-06 07:27:46 +03:00
|
|
|
'lib/internal/util/comparisons.js',
|
2019-03-06 14:54:12 +03:00
|
|
|
'lib/internal/util/debuglog.js',
|
2018-09-13 18:39:10 +03:00
|
|
|
'lib/internal/util/inspect.js',
|
2017-10-29 20:19:24 +03:00
|
|
|
'lib/internal/util/inspector.js',
|
2017-09-28 10:16:41 +03:00
|
|
|
'lib/internal/util/types.js',
|
http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.
This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.
This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.
Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.
The JS API is defined within `internal/http2/*.js`.
There are two APIs provided: Core and Compat.
The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.
The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.
Tests, documentation and initial benchmarks are included.
The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.
When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.
To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.
Additional configuration options to enable verbose debugging are provided:
```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```
The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.
The following illustrates as simple HTTP/2 server and client interaction:
(The HTTP/2 client and server support both plain text and TLS connections)
```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
client.destroy();
});
// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
stream.respond({ ':status': 200 });
stream.write('hello ');
stream.end('world');
});
server.listen(80);
```
```js
const http2 = require('http2');
const client = http2.connect('http://localhost');
```
Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-17 20:17:16 +03:00
|
|
|
'lib/internal/http2/core.js',
|
|
|
|
'lib/internal/http2/compat.js',
|
|
|
|
'lib/internal/http2/util.js',
|
2015-11-25 17:08:58 +03:00
|
|
|
'lib/internal/v8_prof_polyfill.js',
|
|
|
|
'lib/internal/v8_prof_processor.js',
|
2018-04-15 12:16:50 +03:00
|
|
|
'lib/internal/validators.js',
|
2018-03-18 10:35:47 +03:00
|
|
|
'lib/internal/stream_base_commons.js',
|
2018-07-28 05:21:30 +03:00
|
|
|
'lib/internal/vm/source_text_module.js',
|
2017-09-05 23:38:32 +03:00
|
|
|
'lib/internal/worker.js',
|
2018-12-23 06:53:05 +03:00
|
|
|
'lib/internal/worker/io.js',
|
2015-08-27 00:41:28 +03:00
|
|
|
'lib/internal/streams/lazy_transform.js',
|
2017-12-19 15:33:31 +03:00
|
|
|
'lib/internal/streams/async_iterator.js',
|
2018-03-23 17:32:23 +03:00
|
|
|
'lib/internal/streams/buffer_list.js',
|
2017-12-23 07:55:37 +03:00
|
|
|
'lib/internal/streams/duplexpair.js',
|
2016-08-09 18:34:23 +03:00
|
|
|
'lib/internal/streams/legacy.js',
|
2017-05-06 15:20:52 +03:00
|
|
|
'lib/internal/streams/destroy.js',
|
2018-01-09 22:39:29 +03:00
|
|
|
'lib/internal/streams/state.js',
|
2018-04-04 17:52:19 +03:00
|
|
|
'lib/internal/streams/pipeline.js',
|
|
|
|
'lib/internal/streams/end-of-stream.js',
|
2015-11-25 17:08:58 +03:00
|
|
|
'deps/v8/tools/splaytree.js',
|
|
|
|
'deps/v8/tools/codemap.js',
|
|
|
|
'deps/v8/tools/consarray.js',
|
|
|
|
'deps/v8/tools/csvparser.js',
|
|
|
|
'deps/v8/tools/profile.js',
|
|
|
|
'deps/v8/tools/profile_view.js',
|
|
|
|
'deps/v8/tools/logreader.js',
|
2018-01-30 17:23:16 +03:00
|
|
|
'deps/v8/tools/arguments.js',
|
2015-11-25 17:08:58 +03:00
|
|
|
'deps/v8/tools/tickprocessor.js',
|
|
|
|
'deps/v8/tools/SourceMap.js',
|
|
|
|
'deps/v8/tools/tickprocessor-driver.js',
|
2016-12-20 20:01:28 +03:00
|
|
|
'deps/node-inspect/lib/_inspect.js',
|
|
|
|
'deps/node-inspect/lib/internal/inspect_client.js',
|
|
|
|
'deps/node-inspect/lib/internal/inspect_repl.js',
|
2019-01-31 10:36:48 +03:00
|
|
|
'deps/acorn/acorn/dist/acorn.js',
|
|
|
|
'deps/acorn/acorn-walk/dist/walk.js',
|
2011-09-05 03:01:53 +04:00
|
|
|
],
|
2016-03-27 03:17:55 +03:00
|
|
|
'conditions': [
|
|
|
|
[ 'node_shared=="true"', {
|
|
|
|
'node_target_type%': 'shared_library',
|
2017-12-05 03:07:53 +03:00
|
|
|
'conditions': [
|
|
|
|
['OS=="aix"', {
|
|
|
|
# For AIX, always generate static library first,
|
|
|
|
# It needs an extra step to generate exp and
|
|
|
|
# then use both static lib and exp to create
|
|
|
|
# shared lib.
|
|
|
|
'node_intermediate_lib_type': 'static_library',
|
|
|
|
}, {
|
|
|
|
'node_intermediate_lib_type': 'shared_library',
|
|
|
|
}],
|
|
|
|
],
|
2016-03-27 03:17:55 +03:00
|
|
|
}, {
|
|
|
|
'node_target_type%': 'executable',
|
|
|
|
}],
|
2016-04-18 17:10:20 +03:00
|
|
|
[ 'OS=="win" and '
|
|
|
|
'node_use_openssl=="true" and '
|
|
|
|
'node_shared_openssl=="false"', {
|
2018-10-19 22:09:00 +03:00
|
|
|
'use_openssl_def%': 1,
|
2016-04-18 17:10:20 +03:00
|
|
|
}, {
|
2018-10-19 22:09:00 +03:00
|
|
|
'use_openssl_def%': 0,
|
2016-04-18 17:10:20 +03:00
|
|
|
}],
|
2016-03-27 03:17:55 +03:00
|
|
|
],
|
2011-08-04 10:36:27 +04:00
|
|
|
},
|
|
|
|
|
2011-08-04 04:01:30 +04:00
|
|
|
'targets': [
|
|
|
|
{
|
2015-09-29 17:22:00 +03:00
|
|
|
'target_name': '<(node_core_target_name)',
|
2017-12-05 03:07:53 +03:00
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'src/node_main.cc'
|
|
|
|
],
|
2018-03-07 23:25:26 +03:00
|
|
|
'includes': [
|
|
|
|
'node.gypi'
|
|
|
|
],
|
2017-12-05 03:07:53 +03:00
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
2019-01-07 22:36:35 +03:00
|
|
|
'deps/v8/include'
|
2017-12-05 03:07:53 +03:00
|
|
|
],
|
2019-01-07 22:36:35 +03:00
|
|
|
'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
|
2018-09-04 05:00:09 +03:00
|
|
|
|
2019-02-03 23:51:20 +03:00
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'GenerateMapFile': 'true', # /MAP
|
|
|
|
'MapExports': 'true', # /MAPINFO:EXPORTS
|
|
|
|
'RandomizedBaseAddress': 2, # enable ASLR
|
|
|
|
'DataExecutionPrevention': 2, # enable DEP
|
|
|
|
'AllowIsolation': 'true',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-09-04 05:00:09 +03:00
|
|
|
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
|
|
|
|
# Ususaly safe. Disable for `dep`, enable for `src`
|
|
|
|
'msvs_disabled_warnings!': [4244],
|
|
|
|
|
2017-12-05 03:07:53 +03:00
|
|
|
'conditions': [
|
|
|
|
[ 'node_intermediate_lib_type=="static_library" and '
|
|
|
|
'node_shared=="true" and OS=="aix"', {
|
|
|
|
# For AIX, shared lib is linked by static lib and .exp. In the
|
|
|
|
# case here, the executable needs to link to shared lib.
|
|
|
|
# Therefore, use 'node_aix_shared' target to generate the
|
|
|
|
# shared lib and then executable.
|
|
|
|
'dependencies': [ 'node_aix_shared' ],
|
|
|
|
}, {
|
|
|
|
'dependencies': [ '<(node_lib_target_name)' ],
|
|
|
|
}],
|
2019-02-03 23:51:20 +03:00
|
|
|
[ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', {
|
2017-12-05 03:07:53 +03:00
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [
|
|
|
|
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
|
|
|
|
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalOptions': [
|
2018-09-04 04:56:02 +03:00
|
|
|
'/WHOLEARCHIVE:<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
|
2017-12-05 03:07:53 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'conditions': [
|
2018-01-18 00:16:14 +03:00
|
|
|
['OS!="aix"', {
|
2017-12-05 03:07:53 +03:00
|
|
|
'ldflags': [
|
2017-10-16 16:34:42 +03:00
|
|
|
'-Wl,--whole-archive,<(obj_dir)/<(STATIC_LIB_PREFIX)'
|
2017-12-05 03:07:53 +03:00
|
|
|
'<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
|
|
|
|
'-Wl,--no-whole-archive',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'OS=="win"', {
|
|
|
|
'sources': [ 'src/res/node.rc' ],
|
|
|
|
'conditions': [
|
|
|
|
[ 'node_use_etw=="true"', {
|
|
|
|
'sources': [
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.rc'
|
|
|
|
],
|
2018-09-30 20:44:55 +03:00
|
|
|
}],
|
2017-12-05 03:07:53 +03:00
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2018-02-02 21:06:33 +03:00
|
|
|
[ 'node_shared=="true"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
|
|
|
|
},
|
|
|
|
}],
|
2017-12-05 03:07:53 +03:00
|
|
|
[ 'node_intermediate_lib_type=="shared_library" and OS=="win"', {
|
|
|
|
# On Windows, having the same name for both executable and shared
|
|
|
|
# lib causes filename collision. Need a different PRODUCT_NAME for
|
|
|
|
# the executable and rename it back to node.exe later
|
|
|
|
'product_name': '<(node_core_target_name)-win',
|
|
|
|
}],
|
2018-09-05 17:06:59 +03:00
|
|
|
[ 'node_report=="true"', {
|
|
|
|
'defines': [
|
|
|
|
'NODE_REPORT',
|
|
|
|
'NODE_ARCH="<(target_arch)"',
|
|
|
|
'NODE_PLATFORM="<(OS)"',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['OS=="win"', {
|
|
|
|
'libraries': [
|
|
|
|
'dbghelp.lib',
|
|
|
|
'PsApi.lib',
|
|
|
|
'Ws2_32.lib',
|
|
|
|
],
|
|
|
|
'dll_files': [
|
|
|
|
'dbghelp.dll',
|
|
|
|
'PsApi.dll',
|
|
|
|
'Ws2_32.dll',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2019-02-03 23:51:20 +03:00
|
|
|
['node_with_ltcg=="true"', {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG
|
|
|
|
},
|
|
|
|
'VCLibrarianTool': {
|
|
|
|
'AdditionalOptions': [
|
|
|
|
'/LTCG:INCREMENTAL', # link time code generation
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'OptimizeReferences': 2, # /OPT:REF
|
|
|
|
'EnableCOMDATFolding': 2, # /OPT:ICF
|
|
|
|
'LinkIncremental': 1, # disable incremental linking
|
|
|
|
'AdditionalOptions': [
|
|
|
|
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'WholeProgramOptimization': 'false'
|
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'LinkIncremental': 2 # enable incremental linking
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}]
|
2017-12-05 03:07:53 +03:00
|
|
|
],
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # node_core_target_name
|
2017-12-05 03:07:53 +03:00
|
|
|
{
|
|
|
|
'target_name': '<(node_lib_target_name)',
|
|
|
|
'type': '<(node_intermediate_lib_type)',
|
|
|
|
'product_name': '<(node_core_target_name)',
|
2016-10-18 17:41:26 +03:00
|
|
|
'includes': [
|
|
|
|
'node.gypi'
|
|
|
|
],
|
|
|
|
|
2011-08-05 03:40:07 +04:00
|
|
|
'include_dirs': [
|
2011-08-08 23:11:48 +04:00
|
|
|
'src',
|
2017-11-06 11:59:01 +03:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
|
2011-08-05 03:40:07 +04:00
|
|
|
],
|
2019-01-07 22:36:35 +03:00
|
|
|
'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
|
2011-08-05 03:40:07 +04:00
|
|
|
|
2011-08-04 04:01:30 +04:00
|
|
|
'sources': [
|
2019-01-16 22:00:55 +03:00
|
|
|
'src/api/callback.cc',
|
|
|
|
'src/api/encoding.cc',
|
|
|
|
'src/api/environment.cc',
|
|
|
|
'src/api/exceptions.cc',
|
|
|
|
'src/api/hooks.cc',
|
|
|
|
'src/api/utils.cc',
|
|
|
|
|
2017-11-14 15:34:52 +03:00
|
|
|
'src/async_wrap.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/cares_wrap.cc',
|
2016-06-29 21:20:54 +03:00
|
|
|
'src/connect_wrap.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/connection_wrap.cc',
|
2018-06-07 17:54:29 +03:00
|
|
|
'src/debug_utils.cc',
|
2017-01-18 14:34:33 +03:00
|
|
|
'src/env.cc',
|
|
|
|
'src/fs_event_wrap.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/handle_wrap.cc',
|
2018-07-01 02:27:09 +03:00
|
|
|
'src/heap_utils.cc',
|
2018-10-19 22:10:59 +03:00
|
|
|
'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',
|
2015-02-23 23:09:44 +03:00
|
|
|
'src/js_stream.cc',
|
2017-06-06 03:44:56 +03:00
|
|
|
'src/module_wrap.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/node.cc',
|
2017-03-21 00:55:26 +03:00
|
|
|
'src/node_api.cc',
|
2018-11-28 19:46:45 +03:00
|
|
|
'src/node_binding.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/node_buffer.cc',
|
2016-04-19 07:02:18 +03:00
|
|
|
'src/node_config.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/node_constants.cc',
|
vm, core, module: re-do vm to fix known issues
As documented in #3042 and in [1], the existing vm implementation has
many problems. All of these are solved by @brianmcd's [contextify][2]
package. This commit uses contextify as a conceptual base and its code
core to overhaul the vm module and fix its many edge cases and caveats.
Functionally, this fixes #3042. In particular:
- A context is now indistinguishable from the object it is based on
(the "sandbox"). A context is simply a sandbox that has been marked
by the vm module, via `vm.createContext`, with special internal
information that allows scripts to be run inside of it.
- Consequently, items added to the context from anywhere are
immediately visible to all code that can access that context, both
inside and outside the virtual machine.
This commit also smooths over the API very slightly:
- Parameter defaults are now uniformly triggered via `undefined`, per
ES6 semantics and previous discussion at [3].
- Several undocumented and problematic features have been removed, e.g.
the conflation of `vm.Script` with `vm` itself, and the fact that
`Script` instances also had all static `vm` methods. The API is now
exactly as documented (although arguably the existence of the
`vm.Script` export is not yet documented, just the `Script` class
itself).
In terms of implementation, this replaces node_script.cc with
node_contextify.cc, which is derived originally from [4] (see [5]) but
has since undergone extensive modifications and iterations to expose
the most useful C++ API and use the coding conventions and utilities of
Node core.
The bindings exposed by `process.binding('contextify')`
(node_contextify.cc) replace those formerly exposed by
`process.binding('evals')` (node_script.cc). They are:
- ContextifyScript(code, [filename]), with methods:
- runInThisContext()
- runInContext(sandbox, [timeout])
- makeContext(sandbox)
From this, the vm.js file builds the entire documented vm module API.
node.js and module.js were modified to use this new native binding, or
the vm module itself where possible. This introduces an extra line or
two into the stack traces of module compilation (and thus into most
stack traces), explaining the changed tests.
The tests were also updated slightly, with all vm-related simple tests
consolidated as test/simple/test-vm-* (some of them were formerly
test/simple/test-script-*). At the same time they switched from
`common.debug` to `console.error` and were updated to use
`assert.throws` instead of rolling their own error-testing methods.
New tests were also added, of course, demonstrating the new
capabilities and fixes.
[1]: http://nodejs.org/docs/v0.10.16/api/vm.html#vm_caveats
[2]: https://github.com/brianmcd/contextify
[3]: https://github.com/joyent/node/issues/5323#issuecomment-20250726
[4]: https://github.com/kkoopa/contextify/blob/bf123f3ef960f0943d1e30bda02e3163a004e964/src/contextify.cc
[5]: https://gist.github.com/domenic/6068120
2013-07-27 08:34:12 +04:00
|
|
|
'src/node_contextify.cc',
|
2018-12-15 22:13:12 +03:00
|
|
|
'src/node_credentials.cc',
|
2018-01-19 23:42:59 +03:00
|
|
|
'src/node_domain.cc',
|
2018-12-15 20:32:39 +03:00
|
|
|
'src/node_env_var.cc',
|
2018-11-03 17:45:40 +03:00
|
|
|
'src/node_errors.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/node_file.cc',
|
2018-11-30 09:39:02 +03:00
|
|
|
'src/node_http_parser_llhttp.cc',
|
|
|
|
'src/node_http_parser_traditional.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_http2.cc',
|
|
|
|
'src/node_i18n.cc',
|
2017-09-05 23:38:32 +03:00
|
|
|
'src/node_messaging.cc',
|
2018-12-01 23:16:09 +03:00
|
|
|
'src/node_metadata.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_native_module.cc',
|
2018-08-10 03:45:28 +03:00
|
|
|
'src/node_options.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/node_os.cc',
|
2017-08-08 01:53:24 +03:00
|
|
|
'src/node_perf.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_platform.cc',
|
2017-12-26 03:17:25 +03:00
|
|
|
'src/node_postmortem_metadata.cc',
|
2018-12-31 17:59:40 +03:00
|
|
|
'src/node_process_events.cc',
|
2019-01-08 19:00:33 +03:00
|
|
|
'src/node_process_methods.cc',
|
|
|
|
'src/node_process_object.cc',
|
2017-01-27 08:38:11 +03:00
|
|
|
'src/node_serdes.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_stat_watcher.cc',
|
2018-12-19 15:33:20 +03:00
|
|
|
'src/node_symbols.cc',
|
2018-12-19 13:44:14 +03:00
|
|
|
'src/node_task_queue.cc',
|
2017-07-18 02:47:12 +03:00
|
|
|
'src/node_trace_events.cc',
|
2018-01-28 00:01:32 +03:00
|
|
|
'src/node_types.cc',
|
2016-05-31 21:52:19 +03:00
|
|
|
'src/node_url.cc',
|
2015-09-29 22:30:22 +03:00
|
|
|
'src/node_util.cc',
|
2013-10-28 17:57:47 +04:00
|
|
|
'src/node_v8.cc',
|
2012-10-08 23:24:08 +04:00
|
|
|
'src/node_watchdog.cc',
|
2017-09-01 18:03:41 +03:00
|
|
|
'src/node_worker.cc',
|
2011-09-07 03:13:05 +04:00
|
|
|
'src/node_zlib.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/pipe_wrap.cc',
|
2017-01-18 14:34:33 +03:00
|
|
|
'src/process_wrap.cc',
|
2018-05-13 20:39:32 +03:00
|
|
|
'src/sharedarraybuffer_metadata.cc',
|
2012-08-21 01:59:21 +04:00
|
|
|
'src/signal_wrap.cc',
|
2014-02-11 00:22:06 +04:00
|
|
|
'src/spawn_sync.cc',
|
stream_base: introduce StreamBase
StreamBase is an improved way to write C++ streams. The class itself is
for separting `StreamWrap` (with the methods like `.writeAsciiString`,
`.writeBuffer`, `.writev`, etc) from the `HandleWrap` class, making
possible to write abstract C++ streams that are not bound to any uv
socket.
The following methods are important part of the abstraction (which
mimics libuv's stream API):
* Events:
* `OnAlloc(size_t size, uv_buf_t*)`
* `OnRead(ssize_t nread, const uv_buf_t*, uv_handle_type pending)`
* `OnAfterWrite(WriteWrap*)`
* Wrappers:
* `DoShutdown(ShutdownWrap*)`
* `DoTryWrite(uv_buf_t** bufs, size_t* count)`
* `DoWrite(WriteWrap*, uv_buf_t*, size_t count, uv_stream_t* handle)`
* `Error()`
* `ClearError()`
The implementation should provide all of these methods, thus providing
the access to the underlying resource (be it uv handle, TLS socket, or
anything else).
A C++ stream may consume the input of another stream by replacing the
event callbacks and proxying the writes. This kind of API is actually
used now for the TLSWrap implementation, making it possible to wrap TLS
stream into another TLS stream. Thus legacy API calls are no longer
required in `_tls_wrap.js`.
PR-URL: https://github.com/iojs/io.js/pull/840
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-22 21:59:07 +03:00
|
|
|
'src/stream_base.cc',
|
2018-02-13 03:23:50 +03:00
|
|
|
'src/stream_pipe.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/stream_wrap.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/string_bytes.cc',
|
|
|
|
'src/string_decoder.cc',
|
2011-08-08 23:11:48 +04:00
|
|
|
'src/tcp_wrap.cc',
|
2018-05-13 18:42:22 +03:00
|
|
|
'src/timers.cc',
|
2017-01-18 14:34:33 +03:00
|
|
|
'src/tracing/agent.cc',
|
|
|
|
'src/tracing/node_trace_buffer.cc',
|
|
|
|
'src/tracing/node_trace_writer.cc',
|
|
|
|
'src/tracing/trace_event.cc',
|
2018-06-22 22:50:01 +03:00
|
|
|
'src/tracing/traced_value.cc',
|
2011-09-21 00:38:07 +04:00
|
|
|
'src/tty_wrap.cc',
|
2011-08-25 03:20:08 +04:00
|
|
|
'src/udp_wrap.cc',
|
2017-01-17 09:51:25 +03:00
|
|
|
'src/util.cc',
|
2013-07-17 01:08:25 +04:00
|
|
|
'src/uv.cc',
|
2011-08-15 20:35:48 +04:00
|
|
|
# headers to make for a more pleasant IDE experience
|
2017-08-25 22:45:00 +03:00
|
|
|
'src/aliased_buffer.h',
|
2017-11-14 15:34:52 +03:00
|
|
|
'src/async_wrap.h',
|
|
|
|
'src/async_wrap-inl.h',
|
2017-11-14 15:34:52 +03:00
|
|
|
'src/base_object.h',
|
|
|
|
'src/base_object-inl.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/base64.h',
|
2016-06-29 21:20:54 +03:00
|
|
|
'src/connect_wrap.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/connection_wrap.h',
|
2018-05-27 17:37:30 +03:00
|
|
|
'src/debug_utils.h',
|
2013-08-11 02:26:11 +04:00
|
|
|
'src/env.h',
|
|
|
|
'src/env-inl.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/handle_wrap.h',
|
2019-01-07 22:36:35 +03:00
|
|
|
'src/histogram.h',
|
|
|
|
'src/histogram-inl.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/http_parser_adaptor.h',
|
2015-02-23 23:09:44 +03:00
|
|
|
'src/js_stream.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/memory_tracker.h',
|
|
|
|
'src/memory_tracker-inl.h',
|
2017-06-06 03:44:56 +03:00
|
|
|
'src/module_wrap.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/node.h',
|
2018-11-06 14:17:05 +03:00
|
|
|
'src/node_api.h',
|
|
|
|
'src/node_api_types.h',
|
2018-11-28 19:46:45 +03:00
|
|
|
'src/node_binding.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/node_buffer.h',
|
|
|
|
'src/node_constants.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_context_data.h',
|
2017-12-09 19:32:34 +03:00
|
|
|
'src/node_contextify.h',
|
2018-11-06 14:17:05 +03:00
|
|
|
'src/node_errors.h',
|
2017-12-14 21:49:55 +03:00
|
|
|
'src/node_file.h',
|
2018-11-30 09:39:02 +03:00
|
|
|
'src/node_http_parser_impl.h',
|
http2: introducing HTTP/2
At long last: The initial *experimental* implementation of HTTP/2.
This is an accumulation of the work that has been done in the nodejs/http2
repository, squashed down to a couple of commits. The original commit
history has been preserved in the nodejs/http2 repository.
This PR introduces the nghttp2 C library as a new dependency. This library
provides the majority of the HTTP/2 protocol implementation, with the rest
of the code here providing the mapping of the library into a usable JS API.
Within src, a handful of new node_http2_*.c and node_http2_*.h files are
introduced. These provide the internal mechanisms that interface with nghttp
and define the `process.binding('http2')` interface.
The JS API is defined within `internal/http2/*.js`.
There are two APIs provided: Core and Compat.
The Core API is HTTP/2 specific and is designed to be as minimal and as
efficient as possible.
The Compat API is intended to be as close to the existing HTTP/1 API as
possible, with some exceptions.
Tests, documentation and initial benchmarks are included.
The `http2` module is gated by a new `--expose-http2` command line flag.
When used, `require('http2')` will be exposed to users. Note that there
is an existing `http2` module on npm that would be impacted by the introduction
of this module, which is the main reason for gating this behind a flag.
When using `require('http2')` the first time, a process warning will be
emitted indicating that an experimental feature is being used.
To run the benchmarks, the `h2load` tool (part of the nghttp project) is
required: `./node benchmarks/http2/simple.js benchmarker=h2load`. Only
two benchmarks are currently available.
Additional configuration options to enable verbose debugging are provided:
```
$ ./configure --debug-http2 --debug-nghttp2
$ NODE_DEBUG=http2 ./node
```
The `--debug-http2` configuration option enables verbose debug statements
from the `src/node_http2_*` files. The `--debug-nghttp2` enables the nghttp
library's own verbose debug output. The `NODE_DEBUG=http2` enables JS-level
debug output.
The following illustrates as simple HTTP/2 server and client interaction:
(The HTTP/2 client and server support both plain text and TLS connections)
```jt client = http2.connect('http://localhost:80');
const req = client.request({ ':path': '/some/path' });
req.on('data', (chunk) => { /* do something with the data */ });
req.on('end', () => {
client.destroy();
});
// Plain text (non-TLS server)
const server = http2.createServer();
server.on('stream', (stream, requestHeaders) => {
stream.respond({ ':status': 200 });
stream.write('hello ');
stream.end('world');
});
server.listen(80);
```
```js
const http2 = require('http2');
const client = http2.connect('http://localhost');
```
Author: Anna Henningsen <anna@addaleax.net>
Author: Colin Ihrig <cjihrig@gmail.com>
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Author: James M Snell <jasnell@gmail.com>
Author: Jun Mukai
Author: Kelvin Jin
Author: Matteo Collina <matteo.collina@gmail.com>
Author: Robert Kowalski <rok@kowalski.gd>
Author: Santiago Gimeno <santiago.gimeno@gmail.com>
Author: Sebastiaan Deckers <sebdeckers83@gmail.com>
Author: Yosuke Furukawa <yosuke.furukawa@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-17 20:17:16 +03:00
|
|
|
'src/node_http2.h',
|
2017-08-25 22:45:00 +03:00
|
|
|
'src/node_http2_state.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_i18n.h',
|
2013-08-11 02:26:11 +04:00
|
|
|
'src/node_internals.h',
|
2017-09-05 23:38:32 +03:00
|
|
|
'src/node_messaging.h',
|
2018-12-01 23:16:09 +03:00
|
|
|
'src/node_metadata.h',
|
2016-06-18 02:39:05 +03:00
|
|
|
'src/node_mutex.h',
|
2018-11-03 09:26:32 +03:00
|
|
|
'src/node_native_module.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_object_wrap.h',
|
2018-08-10 03:45:28 +03:00
|
|
|
'src/node_options.h',
|
|
|
|
'src/node_options-inl.h',
|
2017-08-08 01:53:24 +03:00
|
|
|
'src/node_perf.h',
|
|
|
|
'src/node_perf_common.h',
|
2018-02-21 17:24:18 +03:00
|
|
|
'src/node_persistent.h',
|
|
|
|
'src/node_platform.h',
|
2018-12-31 18:18:08 +03:00
|
|
|
'src/node_process.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_revert.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/node_root_certs.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_stat_watcher.h',
|
2018-11-14 17:38:12 +03:00
|
|
|
'src/node_union_bytes.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_url.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/node_version.h',
|
2019-01-16 21:34:43 +03:00
|
|
|
'src/node_v8_platform-inl.h',
|
2012-10-08 23:24:08 +04:00
|
|
|
'src/node_watchdog.h',
|
2017-09-01 18:03:41 +03:00
|
|
|
'src/node_worker.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/pipe_wrap.h',
|
2017-11-14 15:34:52 +03:00
|
|
|
'src/req_wrap.h',
|
|
|
|
'src/req_wrap-inl.h',
|
2018-05-13 20:39:32 +03:00
|
|
|
'src/sharedarraybuffer_metadata.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/spawn_sync.h',
|
stream_base: introduce StreamBase
StreamBase is an improved way to write C++ streams. The class itself is
for separting `StreamWrap` (with the methods like `.writeAsciiString`,
`.writeBuffer`, `.writev`, etc) from the `HandleWrap` class, making
possible to write abstract C++ streams that are not bound to any uv
socket.
The following methods are important part of the abstraction (which
mimics libuv's stream API):
* Events:
* `OnAlloc(size_t size, uv_buf_t*)`
* `OnRead(ssize_t nread, const uv_buf_t*, uv_handle_type pending)`
* `OnAfterWrite(WriteWrap*)`
* Wrappers:
* `DoShutdown(ShutdownWrap*)`
* `DoTryWrite(uv_buf_t** bufs, size_t* count)`
* `DoWrite(WriteWrap*, uv_buf_t*, size_t count, uv_stream_t* handle)`
* `Error()`
* `ClearError()`
The implementation should provide all of these methods, thus providing
the access to the underlying resource (be it uv handle, TLS socket, or
anything else).
A C++ stream may consume the input of another stream by replacing the
event callbacks and proxying the writes. This kind of API is actually
used now for the TLSWrap implementation, making it possible to wrap TLS
stream into another TLS stream. Thus legacy API calls are no longer
required in `_tls_wrap.js`.
PR-URL: https://github.com/iojs/io.js/pull/840
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-22 21:59:07 +03:00
|
|
|
'src/stream_base.h',
|
2015-02-25 20:43:14 +03:00
|
|
|
'src/stream_base-inl.h',
|
2018-02-13 03:23:50 +03:00
|
|
|
'src/stream_pipe.h',
|
2011-08-15 20:35:48 +04:00
|
|
|
'src/stream_wrap.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/string_bytes.h',
|
|
|
|
'src/string_decoder.h',
|
|
|
|
'src/string_decoder-inl.h',
|
|
|
|
'src/string_search.h',
|
|
|
|
'src/tcp_wrap.h',
|
2017-01-17 10:12:08 +03:00
|
|
|
'src/tracing/agent.h',
|
|
|
|
'src/tracing/node_trace_buffer.h',
|
|
|
|
'src/tracing/node_trace_writer.h',
|
2017-10-30 15:45:10 +03:00
|
|
|
'src/tracing/trace_event.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/tracing/trace_event_common.h',
|
2018-06-22 22:50:01 +03:00
|
|
|
'src/tracing/traced_value.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/tty_wrap.h',
|
|
|
|
'src/udp_wrap.h',
|
2013-08-11 02:26:11 +04:00
|
|
|
'src/util.h',
|
|
|
|
'src/util-inl.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
# Dependency headers
|
2011-08-15 20:35:48 +04:00
|
|
|
'deps/http_parser/http_parser.h',
|
2015-04-03 02:13:43 +03:00
|
|
|
'deps/v8/include/v8.h',
|
2011-09-05 03:01:53 +04:00
|
|
|
# javascript files to make for an even more pleasant IDE experience
|
|
|
|
'<@(library_files)',
|
2018-11-20 05:36:32 +03:00
|
|
|
# node.gyp is added by default, common.gypi is added for change detection
|
2011-10-28 14:10:24 +04:00
|
|
|
'common.gypi',
|
2011-08-05 03:40:07 +04:00
|
|
|
],
|
|
|
|
|
2017-11-06 12:30:29 +03:00
|
|
|
'variables': {
|
|
|
|
'openssl_system_ca_path%': '',
|
|
|
|
},
|
|
|
|
|
2011-08-05 03:40:07 +04:00
|
|
|
'defines': [
|
2015-01-08 15:05:51 +03:00
|
|
|
'NODE_ARCH="<(target_arch)"',
|
|
|
|
'NODE_PLATFORM="<(OS)"',
|
|
|
|
'NODE_WANT_INTERNALS=1',
|
2015-07-02 00:47:37 +03:00
|
|
|
# Warn when using deprecated V8 APIs.
|
|
|
|
'V8_DEPRECATION_WARNINGS=1',
|
2017-11-06 12:30:29 +03:00
|
|
|
'NODE_OPENSSL_SYSTEM_CERT_PATH="<(openssl_system_ca_path)"',
|
2011-08-04 04:01:30 +04:00
|
|
|
],
|
2018-09-04 05:00:09 +03:00
|
|
|
|
|
|
|
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
|
|
|
|
# Ususaly safe. Disable for `dep`, enable for `src`
|
|
|
|
'msvs_disabled_warnings!': [4244],
|
|
|
|
|
2017-11-02 07:19:16 +03:00
|
|
|
'conditions': [
|
2018-06-18 20:02:57 +03:00
|
|
|
[ 'node_code_cache_path!=""', {
|
|
|
|
'sources': [ '<(node_code_cache_path)' ]
|
|
|
|
}, {
|
|
|
|
'sources': [ 'src/node_code_cache_stub.cc' ]
|
|
|
|
}],
|
2017-11-02 07:19:16 +03:00
|
|
|
[ 'node_shared=="true" and node_module_version!="" and OS!="win"', {
|
|
|
|
'product_extension': '<(shlib_suffix)',
|
2018-02-02 21:06:33 +03:00
|
|
|
'xcode_settings': {
|
|
|
|
'LD_DYLIB_INSTALL_NAME':
|
|
|
|
'@rpath/lib<(node_core_target_name).<(shlib_suffix)'
|
|
|
|
},
|
2017-11-08 11:41:09 +03:00
|
|
|
}],
|
2017-12-05 03:07:53 +03:00
|
|
|
['node_shared=="true" and OS=="aix"', {
|
|
|
|
'product_name': 'node_base',
|
|
|
|
}],
|
2017-11-08 11:41:09 +03:00
|
|
|
[ 'v8_enable_inspector==1', {
|
2018-09-27 17:45:24 +03:00
|
|
|
'includes' : [ 'src/inspector/node_inspector.gypi' ],
|
2017-11-08 11:41:09 +03:00
|
|
|
}, {
|
|
|
|
'defines': [ 'HAVE_INSPECTOR=0' ]
|
|
|
|
}],
|
|
|
|
[ 'OS=="win"', {
|
2017-08-23 10:52:59 +03:00
|
|
|
'conditions': [
|
2017-12-05 03:07:53 +03:00
|
|
|
[ 'node_intermediate_lib_type!="static_library"', {
|
2017-08-23 10:52:59 +03:00
|
|
|
'sources': [
|
|
|
|
'src/res/node.rc',
|
|
|
|
],
|
|
|
|
}],
|
2017-11-08 11:41:09 +03:00
|
|
|
],
|
|
|
|
'libraries': [ '-lpsapi.lib' ]
|
|
|
|
}],
|
2017-12-05 03:07:53 +03:00
|
|
|
[ 'node_use_etw=="true"', {
|
|
|
|
'defines': [ 'HAVE_ETW=1' ],
|
|
|
|
'dependencies': [ 'node_etw' ],
|
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
|
|
|
'tools/msvs/genfiles',
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'src/node_win32_etw_provider.h',
|
|
|
|
'src/node_win32_etw_provider-inl.h',
|
|
|
|
'src/node_win32_etw_provider.cc',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_dtrace.h',
|
2017-12-05 03:07:53 +03:00
|
|
|
'src/node_dtrace.cc',
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.h',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['node_intermediate_lib_type != "static_library"', {
|
|
|
|
'sources': [
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.rc',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2017-11-08 11:41:09 +03:00
|
|
|
[ 'node_use_dtrace=="true"', {
|
|
|
|
'defines': [ 'HAVE_DTRACE=1' ],
|
|
|
|
'dependencies': [
|
|
|
|
'node_dtrace_header',
|
|
|
|
'specialize_node_d',
|
|
|
|
],
|
|
|
|
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
|
|
|
|
#
|
|
|
|
# DTrace is supported on linux, solaris, mac, and bsd. There are
|
|
|
|
# three object files associated with DTrace support, but they're
|
|
|
|
# not all used all the time:
|
|
|
|
#
|
|
|
|
# node_dtrace.o all configurations
|
|
|
|
# node_dtrace_ustack.o not supported on mac and linux
|
|
|
|
# node_dtrace_provider.o All except OS X. "dtrace -G" is not
|
|
|
|
# used on OS X.
|
2018-01-23 13:49:25 +03:00
|
|
|
#
|
|
|
|
# Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
|
|
|
|
# actually exist. They're listed here to trick GYP into linking the
|
|
|
|
# corresponding object files into the final "node" executable. These
|
|
|
|
# object files are generated by "dtrace -G" using custom actions
|
|
|
|
# below, and the GYP-generated Makefiles will properly build them when
|
|
|
|
# needed.
|
|
|
|
#
|
2018-11-20 05:36:32 +03:00
|
|
|
'sources': [
|
|
|
|
'src/node_dtrace.h',
|
|
|
|
'src/node_dtrace.cc',
|
|
|
|
],
|
2017-11-08 11:41:09 +03:00
|
|
|
'conditions': [
|
|
|
|
[ 'OS=="linux"', {
|
|
|
|
'sources': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'OS!="mac" and OS!="linux"', {
|
|
|
|
'sources': [
|
2018-01-23 13:49:25 +03:00
|
|
|
'src/node_dtrace_ustack.cc',
|
|
|
|
'src/node_dtrace_provider.cc',
|
2017-11-08 11:41:09 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
] ]
|
|
|
|
} ],
|
|
|
|
[ 'node_use_openssl=="true"', {
|
|
|
|
'sources': [
|
|
|
|
'src/node_crypto.cc',
|
|
|
|
'src/node_crypto_bio.cc',
|
|
|
|
'src/node_crypto_clienthello.cc',
|
|
|
|
'src/node_crypto.h',
|
|
|
|
'src/node_crypto_bio.h',
|
|
|
|
'src/node_crypto_clienthello.h',
|
2018-11-20 05:36:32 +03:00
|
|
|
'src/node_crypto_clienthello-inl.h',
|
|
|
|
'src/node_crypto_groups.h',
|
2017-11-08 11:41:09 +03:00
|
|
|
'src/tls_wrap.cc',
|
|
|
|
'src/tls_wrap.h'
|
|
|
|
],
|
|
|
|
}],
|
2018-09-05 17:06:59 +03:00
|
|
|
[ 'node_report=="true"', {
|
|
|
|
'sources': [
|
|
|
|
'src/node_report.cc',
|
|
|
|
'src/node_report_module.cc',
|
|
|
|
'src/node_report_utils.cc',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'NODE_REPORT',
|
|
|
|
'NODE_ARCH="<(target_arch)"',
|
|
|
|
'NODE_PLATFORM="<(OS)"',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['OS=="win"', {
|
|
|
|
'libraries': [
|
|
|
|
'dbghelp.lib',
|
|
|
|
'PsApi.lib',
|
|
|
|
'Ws2_32.lib',
|
|
|
|
],
|
|
|
|
'dll_files': [
|
|
|
|
'dbghelp.dll',
|
|
|
|
'PsApi.dll',
|
|
|
|
'Ws2_32.dll',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2018-03-23 22:16:48 +03:00
|
|
|
[ 'node_use_large_pages=="true" and OS=="linux"', {
|
|
|
|
'defines': [ 'NODE_ENABLE_LARGE_CODE_PAGES=1' ],
|
|
|
|
# The current implementation of Large Pages is under Linux.
|
|
|
|
# Other implementations are possible but not currently supported.
|
|
|
|
'sources': [
|
|
|
|
'src/large_pages/node_large_page.cc',
|
|
|
|
'src/large_pages/node_large_page.h'
|
|
|
|
],
|
|
|
|
}],
|
2016-04-18 17:10:20 +03:00
|
|
|
[ 'use_openssl_def==1', {
|
2018-09-30 20:44:55 +03:00
|
|
|
# TODO(bnoordhuis) Make all platforms export the same list of symbols.
|
|
|
|
# Teach mkssldef.py to generate linker maps that UNIX linkers understand.
|
2016-04-18 17:10:20 +03:00
|
|
|
'variables': {
|
|
|
|
'mkssldef_flags': [
|
|
|
|
# Categories to export.
|
|
|
|
'-CAES,BF,BIO,DES,DH,DSA,EC,ECDH,ECDSA,ENGINE,EVP,HMAC,MD4,MD5,'
|
2018-03-17 07:13:47 +03:00
|
|
|
'PSK,RC2,RC4,RSA,SHA,SHA0,SHA1,SHA256,SHA512,SOCK,STDIO,TLSEXT,'
|
2018-10-09 03:39:29 +03:00
|
|
|
'FP_API,TLS1_METHOD,TLS1_1_METHOD,TLS1_2_METHOD,SCRYPT,OCSP,'
|
2019-02-07 22:20:25 +03:00
|
|
|
'NEXTPROTONEG,RMD160,CAST,DEPRECATEDIN_1_1_0,DEPRECATEDIN_1_2_0',
|
2016-04-18 17:10:20 +03:00
|
|
|
# Defines.
|
|
|
|
'-DWIN32',
|
|
|
|
# Symbols to filter from the export list.
|
|
|
|
'-X^DSO',
|
|
|
|
'-X^_',
|
|
|
|
'-X^private_',
|
2016-08-05 05:36:40 +03:00
|
|
|
# Base generated DEF on zlib.def
|
|
|
|
'-Bdeps/zlib/win32/zlib.def'
|
2016-04-18 17:10:20 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
['openssl_fips!=""', {
|
|
|
|
'variables': { 'mkssldef_flags': ['-DOPENSSL_FIPS'] },
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'mkssldef',
|
|
|
|
'inputs': [
|
2018-03-07 16:31:05 +03:00
|
|
|
'deps/openssl/openssl/util/libcrypto.num',
|
|
|
|
'deps/openssl/openssl/util/libssl.num',
|
2016-04-18 17:10:20 +03:00
|
|
|
],
|
|
|
|
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
|
2018-09-30 20:44:55 +03:00
|
|
|
'process_outputs_as_sources': 1,
|
2016-04-18 17:10:20 +03:00
|
|
|
'action': [
|
|
|
|
'python',
|
|
|
|
'tools/mkssldef.py',
|
|
|
|
'<@(mkssldef_flags)',
|
|
|
|
'-o',
|
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(_inputs)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2011-08-04 04:01:30 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_js2c',
|
2017-02-03 01:23:49 +03:00
|
|
|
'process_outputs_as_sources': 1,
|
2011-08-04 04:01:30 +04:00
|
|
|
'inputs': [
|
|
|
|
'<@(library_files)',
|
2018-10-09 17:36:52 +03:00
|
|
|
'config.gypi',
|
2018-03-02 06:04:59 +03:00
|
|
|
'tools/check_macros.py'
|
2011-08-04 04:01:30 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2017-02-03 01:23:49 +03:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
|
2011-08-04 04:01:30 +04:00
|
|
|
],
|
2011-08-05 03:40:07 +04:00
|
|
|
'conditions': [
|
2017-12-05 03:07:53 +03:00
|
|
|
[ 'node_use_dtrace=="false" and node_use_etw=="false"', {
|
2013-10-28 23:18:59 +04:00
|
|
|
'inputs': [ 'src/notrace_macros.py' ]
|
2013-07-24 14:53:28 +04:00
|
|
|
}],
|
2018-03-02 06:04:59 +03:00
|
|
|
[ 'node_debug_lib=="false"', {
|
|
|
|
'inputs': [ 'tools/nodcheck_macros.py' ]
|
|
|
|
}],
|
|
|
|
[ 'node_debug_lib=="true"', {
|
|
|
|
'inputs': [ 'tools/dcheck_macros.py' ]
|
2012-11-21 03:27:22 +04:00
|
|
|
}]
|
|
|
|
],
|
2013-07-24 14:53:28 +04:00
|
|
|
'action': [
|
2018-09-30 20:44:55 +03:00
|
|
|
'python', 'tools/js2c.py',
|
2013-07-24 14:53:28 +04:00
|
|
|
'<@(_outputs)',
|
2018-10-09 17:36:52 +03:00
|
|
|
'<@(_inputs)',
|
2013-07-24 14:53:28 +04:00
|
|
|
],
|
2011-08-04 04:01:30 +04:00
|
|
|
},
|
|
|
|
],
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # node_lib_target_name
|
|
|
|
{
|
|
|
|
# generate ETW header and resource files
|
|
|
|
'target_name': 'node_etw',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
|
|
|
[ 'node_use_etw=="true"', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_etw',
|
|
|
|
'inputs': [ 'src/res/node_etw_provider.man' ],
|
|
|
|
'outputs': [
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.rc',
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.h',
|
|
|
|
'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
|
|
|
|
],
|
|
|
|
'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
} ]
|
|
|
|
]
|
|
|
|
}, # node_etw
|
2012-03-28 21:26:10 +04:00
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_header',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2014-12-11 20:04:31 +03:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="linux"', {
|
2012-03-28 21:26:10 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_header',
|
|
|
|
'inputs': [ 'src/node_provider.d' ],
|
|
|
|
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
|
|
|
|
'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
|
|
|
|
'-o', '<@(_outputs)' ]
|
|
|
|
}
|
|
|
|
]
|
2014-12-09 22:02:39 +03:00
|
|
|
} ],
|
|
|
|
[ 'node_use_dtrace=="true" and OS=="linux"', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_header',
|
|
|
|
'inputs': [ 'src/node_provider.d' ],
|
|
|
|
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
|
|
|
|
'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
|
|
|
|
'-o', '<@(_outputs)' ]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
} ],
|
2012-03-28 21:26:10 +04:00
|
|
|
]
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # node_dtrace_header
|
2012-03-28 21:26:10 +04:00
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_provider',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2013-10-28 23:18:59 +04:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
|
2012-03-28 21:26:10 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_provider_o',
|
|
|
|
'inputs': [
|
2017-10-16 16:34:42 +03:00
|
|
|
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace.o',
|
2012-03-28 21:26:10 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
2017-10-16 16:34:42 +03:00
|
|
|
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_provider.o'
|
2012-03-28 21:26:10 +04:00
|
|
|
],
|
2013-04-17 03:18:07 +04:00
|
|
|
'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
|
2014-12-03 09:55:53 +03:00
|
|
|
'<@(_inputs)', '-o', '<@(_outputs)' ]
|
2012-03-28 21:26:10 +04:00
|
|
|
}
|
|
|
|
]
|
2013-10-28 23:18:59 +04:00
|
|
|
}],
|
|
|
|
[ 'node_use_dtrace=="true" and OS=="linux"', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_provider_o',
|
|
|
|
'inputs': [ 'src/node_provider.d' ],
|
|
|
|
'outputs': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
|
|
|
|
],
|
2014-12-03 09:55:53 +03:00
|
|
|
}
|
2013-10-28 23:18:59 +04:00
|
|
|
],
|
|
|
|
}],
|
2012-03-28 21:26:10 +04:00
|
|
|
]
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # node_dtrace_provider
|
2012-03-28 21:26:10 +04:00
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_ustack',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2013-10-28 23:18:59 +04:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
|
2012-03-28 21:26:10 +04:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_ustack_constants',
|
|
|
|
'inputs': [
|
2017-10-16 16:34:42 +03:00
|
|
|
'<(v8_base)'
|
2012-03-28 21:26:10 +04:00
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'tools/genv8constants.py',
|
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(_inputs)'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_ustack',
|
|
|
|
'inputs': [
|
|
|
|
'src/v8ustack.d',
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
|
|
|
|
],
|
|
|
|
'outputs': [
|
2017-10-16 16:34:42 +03:00
|
|
|
'<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_ustack.o'
|
2012-03-28 21:26:10 +04:00
|
|
|
],
|
2013-02-26 11:57:12 +04:00
|
|
|
'conditions': [
|
2017-03-27 12:48:21 +03:00
|
|
|
[ 'target_arch=="ia32" or target_arch=="arm"', {
|
2013-02-26 11:57:12 +04:00
|
|
|
'action': [
|
|
|
|
'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
|
|
|
|
'-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
|
|
|
|
]
|
|
|
|
} ],
|
|
|
|
[ 'target_arch=="x64"', {
|
|
|
|
'action': [
|
|
|
|
'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
|
|
|
|
'-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
|
|
|
|
]
|
|
|
|
} ],
|
2012-03-28 21:26:10 +04:00
|
|
|
]
|
2014-02-20 20:52:26 +04:00
|
|
|
},
|
2012-03-28 21:26:10 +04:00
|
|
|
]
|
|
|
|
} ],
|
|
|
|
]
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # node_dtrace_ustack
|
2014-02-20 20:52:26 +04:00
|
|
|
{
|
|
|
|
'target_name': 'specialize_node_d',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
|
|
|
[ 'node_use_dtrace=="true"', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'specialize_node_d',
|
|
|
|
'inputs': [
|
|
|
|
'src/node.d'
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(PRODUCT_DIR)/node.d',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'tools/specialize_node_d.py',
|
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(_inputs)',
|
|
|
|
'<@(OS)',
|
|
|
|
'<@(target_arch)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} ],
|
|
|
|
]
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # specialize_node_d
|
2017-12-05 03:07:53 +03:00
|
|
|
{
|
|
|
|
# When using shared lib to build executable in Windows, in order to avoid
|
|
|
|
# filename collision, the executable name is node-win.exe. Need to rename
|
|
|
|
# it back to node.exe
|
|
|
|
'target_name': 'rename_node_bin_win',
|
|
|
|
'type': 'none',
|
|
|
|
'dependencies': [
|
|
|
|
'<(node_core_target_name)',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'OS=="win" and node_intermediate_lib_type=="shared_library"', {
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'rename_node_bin_win',
|
|
|
|
'inputs': [
|
|
|
|
'<(PRODUCT_DIR)/<(node_core_target_name)-win.exe'
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(PRODUCT_DIR)/<(node_core_target_name).exe',
|
|
|
|
],
|
|
|
|
'action': [
|
2018-12-21 18:37:30 +03:00
|
|
|
'move', '<@(_inputs)', '<@(_outputs)',
|
2017-12-05 03:07:53 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} ],
|
|
|
|
]
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # rename_node_bin_win
|
2015-03-19 04:01:45 +03:00
|
|
|
{
|
|
|
|
'target_name': 'cctest',
|
|
|
|
'type': 'executable',
|
2016-10-18 17:41:26 +03:00
|
|
|
|
|
|
|
'dependencies': [
|
2018-02-05 16:57:13 +03:00
|
|
|
'<(node_lib_target_name)',
|
2017-12-05 03:07:53 +03:00
|
|
|
'rename_node_bin_win',
|
2016-10-18 17:41:26 +03:00
|
|
|
'deps/gtest/gtest.gyp:gtest',
|
2019-01-07 22:36:35 +03:00
|
|
|
'deps/histogram/histogram.gyp:histogram',
|
2016-10-18 17:41:26 +03:00
|
|
|
'node_dtrace_header',
|
|
|
|
'node_dtrace_ustack',
|
|
|
|
'node_dtrace_provider',
|
|
|
|
],
|
|
|
|
|
|
|
|
'includes': [
|
|
|
|
'node.gypi'
|
|
|
|
],
|
|
|
|
|
2015-03-19 04:01:45 +03:00
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
2016-10-18 17:41:26 +03:00
|
|
|
'tools/msvs/genfiles',
|
2016-11-10 01:19:35 +03:00
|
|
|
'deps/v8/include',
|
2016-10-18 17:41:26 +03:00
|
|
|
'deps/cares/include',
|
|
|
|
'deps/uv/include',
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
|
|
|
|
],
|
|
|
|
|
2017-07-25 13:20:40 +03:00
|
|
|
'defines': [ 'NODE_WANT_INTERNALS=1' ],
|
2016-10-18 17:41:26 +03:00
|
|
|
|
2015-03-19 04:01:45 +03:00
|
|
|
'sources': [
|
2017-08-25 22:45:00 +03:00
|
|
|
'test/cctest/node_test_fixture.cc',
|
|
|
|
'test/cctest/test_aliased_buffer.cc',
|
2017-04-05 17:05:55 +03:00
|
|
|
'test/cctest/test_base64.cc',
|
2017-12-26 03:17:25 +03:00
|
|
|
'test/cctest/test_node_postmortem_metadata.cc',
|
2017-03-21 10:06:43 +03:00
|
|
|
'test/cctest/test_environment.cc',
|
2019-03-05 22:09:43 +03:00
|
|
|
'test/cctest/test_linked_binding.cc',
|
2018-04-12 23:01:11 +03:00
|
|
|
'test/cctest/test_platform.cc',
|
2019-01-22 00:16:46 +03:00
|
|
|
'test/cctest/test_report_util.cc',
|
2018-06-22 22:50:01 +03:00
|
|
|
'test/cctest/test_traced_value.cc',
|
2016-10-18 17:41:26 +03:00
|
|
|
'test/cctest/test_util.cc',
|
2017-03-25 20:33:29 +03:00
|
|
|
'test/cctest/test_url.cc'
|
2016-10-18 17:41:26 +03:00
|
|
|
],
|
|
|
|
|
2016-02-07 19:47:14 +03:00
|
|
|
'conditions': [
|
2017-11-08 11:41:09 +03:00
|
|
|
[ 'node_use_openssl=="true"', {
|
2017-12-05 00:08:15 +03:00
|
|
|
'defines': [
|
|
|
|
'HAVE_OPENSSL=1',
|
|
|
|
],
|
2017-08-15 10:17:02 +03:00
|
|
|
}],
|
2017-01-17 22:49:26 +03:00
|
|
|
['v8_enable_inspector==1', {
|
2016-02-07 19:47:14 +03:00
|
|
|
'sources': [
|
2016-11-10 01:19:35 +03:00
|
|
|
'test/cctest/test_inspector_socket.cc',
|
|
|
|
'test/cctest/test_inspector_socket_server.cc'
|
2016-07-06 23:16:35 +03:00
|
|
|
],
|
2017-11-08 11:41:09 +03:00
|
|
|
'defines': [
|
|
|
|
'HAVE_INSPECTOR=1',
|
|
|
|
],
|
|
|
|
}, {
|
2018-02-05 16:57:13 +03:00
|
|
|
'defines': [ 'HAVE_INSPECTOR=0' ]
|
2016-03-27 03:17:55 +03:00
|
|
|
}],
|
2016-10-18 17:41:26 +03:00
|
|
|
['OS=="solaris"', {
|
|
|
|
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
|
|
|
|
}],
|
2018-07-24 23:44:09 +03:00
|
|
|
# Skip cctest while building shared lib node for Windows
|
|
|
|
[ 'OS=="win" and node_shared=="true"', {
|
|
|
|
'type': 'none',
|
|
|
|
}],
|
2018-09-29 23:43:39 +03:00
|
|
|
[ 'node_shared=="true"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
|
|
|
|
},
|
|
|
|
}],
|
2018-09-05 17:06:59 +03:00
|
|
|
[ 'node_report=="true"', {
|
|
|
|
'defines': [
|
|
|
|
'NODE_REPORT',
|
|
|
|
'NODE_ARCH="<(target_arch)"',
|
|
|
|
'NODE_PLATFORM="<(OS)"',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
['OS=="win"', {
|
|
|
|
'libraries': [
|
|
|
|
'dbghelp.lib',
|
|
|
|
'PsApi.lib',
|
|
|
|
'Ws2_32.lib',
|
|
|
|
],
|
|
|
|
'dll_files': [
|
|
|
|
'dbghelp.dll',
|
|
|
|
'PsApi.dll',
|
|
|
|
'Ws2_32.dll',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2018-02-05 16:57:13 +03:00
|
|
|
],
|
2018-09-30 20:44:55 +03:00
|
|
|
}, # cctest
|
2015-09-29 17:22:00 +03:00
|
|
|
], # end targets
|
|
|
|
|
|
|
|
'conditions': [
|
2017-12-05 03:07:53 +03:00
|
|
|
[ 'OS=="aix" and node_shared=="true"', {
|
2017-08-23 10:52:59 +03:00
|
|
|
'targets': [
|
|
|
|
{
|
2017-12-05 03:07:53 +03:00
|
|
|
'target_name': 'node_aix_shared',
|
|
|
|
'type': 'shared_library',
|
2017-08-23 10:52:59 +03:00
|
|
|
'product_name': '<(node_core_target_name)',
|
2017-12-05 03:07:53 +03:00
|
|
|
'ldflags': [ '--shared' ],
|
|
|
|
'product_extension': '<(shlib_suffix)',
|
|
|
|
'includes': [
|
|
|
|
'node.gypi'
|
|
|
|
],
|
|
|
|
'dependencies': [ '<(node_lib_target_name)' ],
|
2015-09-29 17:22:00 +03:00
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
|
|
|
'deps/v8/include',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'<@(library_files)',
|
|
|
|
'common.gypi',
|
|
|
|
],
|
2018-02-02 21:06:33 +03:00
|
|
|
'direct_dependent_settings': {
|
|
|
|
'ldflags': [ '-Wl,-brtl' ],
|
|
|
|
},
|
2015-09-29 17:22:00 +03:00
|
|
|
},
|
2017-12-05 03:07:53 +03:00
|
|
|
]
|
2015-09-29 17:22:00 +03:00
|
|
|
}], # end aix section
|
|
|
|
], # end conditions block
|
2011-08-04 04:01:30 +04:00
|
|
|
}
|