2011-08-04 02:01:30 +02:00
|
|
|
{
|
2011-08-04 08:36:27 +02:00
|
|
|
'variables': {
|
2015-01-24 01:06:07 +01:00
|
|
|
'v8_use_snapshot%': 'false',
|
2012-03-28 19:26:10 +02:00
|
|
|
'node_use_dtrace%': 'false',
|
2015-01-22 13:35:16 +01:00
|
|
|
'node_use_lttng%': 'false',
|
2012-06-12 01:23:17 +02:00
|
|
|
'node_use_etw%': 'false',
|
2012-11-21 00:27:22 +01:00
|
|
|
'node_use_perfctr%': 'false',
|
2016-03-23 02:05:54 +01:00
|
|
|
'node_no_browser_globals%': 'false',
|
2016-03-27 01:17:55 +01:00
|
|
|
'node_use_v8_platform%': 'true',
|
|
|
|
'node_use_bundled_v8%': 'true',
|
|
|
|
'node_shared%': 'false',
|
|
|
|
'node_module_version%': '',
|
2012-02-27 00:02:21 +01:00
|
|
|
'node_shared_zlib%': 'false',
|
2012-10-23 15:01:26 +02:00
|
|
|
'node_shared_http_parser%': 'false',
|
2016-03-17 23:25:17 +01:00
|
|
|
'node_shared_cares%': 'false',
|
2012-10-24 01:54:22 +02:00
|
|
|
'node_shared_libuv%': 'false',
|
2011-09-05 01:01:53 +02:00
|
|
|
'node_use_openssl%': 'true',
|
2012-06-20 22:31:49 +02:00
|
|
|
'node_shared_openssl%': 'false',
|
2014-03-26 21:30:49 +01:00
|
|
|
'node_v8_options%': '',
|
2015-10-21 18:24:12 +02:00
|
|
|
'node_enable_v8_vtunejit%': 'false',
|
2015-09-29 16:22:00 +02:00
|
|
|
'node_core_target_name%': 'node',
|
2011-09-05 01:01:53 +02:00
|
|
|
'library_files': [
|
2016-03-15 21:28:13 +01:00
|
|
|
'lib/internal/bootstrap_node.js',
|
2014-11-03 12:03:34 +01:00
|
|
|
'lib/_debug_agent.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/_debugger.js',
|
|
|
|
'lib/assert.js',
|
|
|
|
'lib/buffer.js',
|
2011-10-11 22:16:33 +02:00
|
|
|
'lib/child_process.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/console.js',
|
|
|
|
'lib/constants.js',
|
|
|
|
'lib/crypto.js',
|
2011-10-12 23:51:25 +02:00
|
|
|
'lib/cluster.js',
|
2011-10-11 22:26:41 +02:00
|
|
|
'lib/dgram.js',
|
2011-10-11 22:21:30 +02:00
|
|
|
'lib/dns.js',
|
2012-04-07 01:26:18 +02:00
|
|
|
'lib/domain.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/events.js',
|
|
|
|
'lib/fs.js',
|
|
|
|
'lib/http.js',
|
2013-04-11 23:47:15 +02:00
|
|
|
'lib/_http_agent.js',
|
2013-04-12 01:11:12 +02:00
|
|
|
'lib/_http_client.js',
|
2013-04-12 00:15:41 +02:00
|
|
|
'lib/_http_common.js',
|
2013-04-12 00:00:45 +02:00
|
|
|
'lib/_http_incoming.js',
|
2013-04-12 00:37:14 +02:00
|
|
|
'lib/_http_outgoing.js',
|
2013-04-12 01:00:19 +02:00
|
|
|
'lib/_http_server.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/https.js',
|
2015-09-26 23:27:36 +02:00
|
|
|
'lib/_linklist.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/module.js',
|
2011-10-11 22:07:14 +02:00
|
|
|
'lib/net.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/os.js',
|
|
|
|
'lib/path.js',
|
2014-12-30 23:25:52 +01:00
|
|
|
'lib/process.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/punycode.js',
|
|
|
|
'lib/querystring.js',
|
|
|
|
'lib/readline.js',
|
|
|
|
'lib/repl.js',
|
|
|
|
'lib/stream.js',
|
2012-10-03 00:44:50 +02:00
|
|
|
'lib/_stream_readable.js',
|
|
|
|
'lib/_stream_writable.js',
|
|
|
|
'lib/_stream_duplex.js',
|
|
|
|
'lib/_stream_transform.js',
|
|
|
|
'lib/_stream_passthrough.js',
|
2015-02-23 21:09:44 +01:00
|
|
|
'lib/_stream_wrap.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/string_decoder.js',
|
|
|
|
'lib/sys.js',
|
2011-10-11 22:07:14 +02:00
|
|
|
'lib/timers.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/tls.js',
|
2014-03-07 00:27:01 +01:00
|
|
|
'lib/_tls_common.js',
|
2013-06-13 15:36:00 +02:00
|
|
|
'lib/_tls_legacy.js',
|
|
|
|
'lib/_tls_wrap.js',
|
2011-10-11 22:41:33 +02:00
|
|
|
'lib/tty.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/url.js',
|
|
|
|
'lib/util.js',
|
2014-12-09 22:57:48 +01:00
|
|
|
'lib/v8.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
'lib/vm.js',
|
2011-09-07 01:13:05 +02:00
|
|
|
'lib/zlib.js',
|
2015-05-22 16:52:05 +02:00
|
|
|
'lib/internal/child_process.js',
|
2015-11-03 19:06:50 +01:00
|
|
|
'lib/internal/cluster.js',
|
2015-02-14 20:53:34 +01:00
|
|
|
'lib/internal/freelist.js',
|
2015-09-26 23:27:36 +02:00
|
|
|
'lib/internal/linkedlist.js',
|
2016-01-26 15:12:41 +01:00
|
|
|
'lib/internal/net.js',
|
2015-08-17 23:33:13 +02:00
|
|
|
'lib/internal/module.js',
|
2016-03-15 21:13:52 +01:00
|
|
|
'lib/internal/process/next_tick.js',
|
|
|
|
'lib/internal/process/promises.js',
|
|
|
|
'lib/internal/process/stdio.js',
|
2016-01-20 20:38:35 +01:00
|
|
|
'lib/internal/process/warning.js',
|
2016-03-15 21:13:52 +01:00
|
|
|
'lib/internal/process.js',
|
2015-11-16 20:09:26 +01:00
|
|
|
'lib/internal/readline.js',
|
2015-04-23 09:35:53 +02:00
|
|
|
'lib/internal/repl.js',
|
2015-09-26 23:27:36 +02:00
|
|
|
'lib/internal/socket_list.js',
|
2015-05-28 16:01:56 +02:00
|
|
|
'lib/internal/util.js',
|
2015-11-25 15:08:58 +01:00
|
|
|
'lib/internal/v8_prof_polyfill.js',
|
|
|
|
'lib/internal/v8_prof_processor.js',
|
2015-08-26 23:41:28 +02:00
|
|
|
'lib/internal/streams/lazy_transform.js',
|
2016-05-31 19:03:59 +02:00
|
|
|
'lib/internal/streams/BufferList.js',
|
2015-11-25 15:08:58 +01: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',
|
|
|
|
'deps/v8/tools/tickprocessor.js',
|
|
|
|
'deps/v8/tools/SourceMap.js',
|
|
|
|
'deps/v8/tools/tickprocessor-driver.js',
|
2011-09-05 01:01:53 +02:00
|
|
|
],
|
2016-03-27 01:17:55 +01:00
|
|
|
'conditions': [
|
|
|
|
[ 'node_shared=="true"', {
|
|
|
|
'node_target_type%': 'shared_library',
|
|
|
|
}, {
|
|
|
|
'node_target_type%': 'executable',
|
|
|
|
}],
|
|
|
|
],
|
2011-08-04 08:36:27 +02:00
|
|
|
},
|
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'targets': [
|
|
|
|
{
|
2015-09-29 16:22:00 +02:00
|
|
|
'target_name': '<(node_core_target_name)',
|
2015-04-04 16:04:49 +02:00
|
|
|
'type': '<(node_target_type)',
|
2011-08-04 08:36:27 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'dependencies': [
|
2011-08-05 01:40:07 +02:00
|
|
|
'node_js2c#host',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
2011-08-05 01:40:07 +02:00
|
|
|
|
|
|
|
'include_dirs': [
|
2011-08-08 21:11:48 +02:00
|
|
|
'src',
|
2013-01-03 23:36:04 +01:00
|
|
|
'tools/msvs/genfiles',
|
2011-08-08 21:11:48 +02:00
|
|
|
'deps/uv/src/ares',
|
2015-04-03 01:13:43 +02:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
|
2011-08-05 01:40:07 +02:00
|
|
|
],
|
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'sources': [
|
2014-11-03 12:03:34 +01:00
|
|
|
'src/debug-agent.cc',
|
2014-12-09 04:55:48 +01:00
|
|
|
'src/async-wrap.cc',
|
2015-05-14 19:46:54 +02:00
|
|
|
'src/env.cc',
|
2011-09-23 01:18:08 +02:00
|
|
|
'src/fs_event_wrap.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/cares_wrap.cc',
|
|
|
|
'src/handle_wrap.cc',
|
2015-02-23 21:09:44 +01:00
|
|
|
'src/js_stream.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/node.cc',
|
|
|
|
'src/node_buffer.cc',
|
2016-04-19 06:02:18 +02:00
|
|
|
'src/node_config.cc',
|
2011-08-08 21:11:48 +02: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 06:34:12 +02:00
|
|
|
'src/node_contextify.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/node_file.cc',
|
|
|
|
'src/node_http_parser.cc',
|
|
|
|
'src/node_javascript.cc',
|
|
|
|
'src/node_main.cc',
|
|
|
|
'src/node_os.cc',
|
2016-02-04 02:16:10 +01:00
|
|
|
'src/node_revert.cc',
|
2015-09-29 21:30:22 +02:00
|
|
|
'src/node_util.cc',
|
2013-10-28 14:57:47 +01:00
|
|
|
'src/node_v8.cc',
|
2012-06-16 22:41:37 +02:00
|
|
|
'src/node_stat_watcher.cc',
|
2012-10-08 21:24:08 +02:00
|
|
|
'src/node_watchdog.cc',
|
2011-09-07 01:13:05 +02:00
|
|
|
'src/node_zlib.cc',
|
build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at https://github.com/joyent/node/pull/7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
https://github.com/joyent/node/pull/7719#issuecomment-54641687
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-05 07:03:24 +02:00
|
|
|
'src/node_i18n.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/pipe_wrap.cc',
|
2012-08-20 23:59:21 +02:00
|
|
|
'src/signal_wrap.cc',
|
2014-02-10 21:22:06 +01:00
|
|
|
'src/spawn_sync.cc',
|
2013-05-02 00:40:43 +02:00
|
|
|
'src/string_bytes.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 19:59:07 +01:00
|
|
|
'src/stream_base.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/stream_wrap.cc',
|
|
|
|
'src/tcp_wrap.cc',
|
|
|
|
'src/timer_wrap.cc',
|
2011-09-20 22:38:07 +02:00
|
|
|
'src/tty_wrap.cc',
|
2011-08-08 21:11:48 +02:00
|
|
|
'src/process_wrap.cc',
|
2011-08-25 01:20:08 +02:00
|
|
|
'src/udp_wrap.cc',
|
2013-07-16 23:08:25 +02:00
|
|
|
'src/uv.cc',
|
2011-08-15 18:35:48 +02:00
|
|
|
# headers to make for a more pleasant IDE experience
|
2013-09-24 23:12:11 +02:00
|
|
|
'src/async-wrap.h',
|
|
|
|
'src/async-wrap-inl.h',
|
2013-11-04 19:49:55 +01:00
|
|
|
'src/base-object.h',
|
|
|
|
'src/base-object-inl.h',
|
2014-11-03 12:03:34 +01:00
|
|
|
'src/debug-agent.h',
|
2013-08-11 00:26:11 +02:00
|
|
|
'src/env.h',
|
|
|
|
'src/env-inl.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/handle_wrap.h',
|
2015-02-23 21:09:44 +01:00
|
|
|
'src/js_stream.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/node.h',
|
|
|
|
'src/node_buffer.h',
|
|
|
|
'src/node_constants.h',
|
|
|
|
'src/node_file.h',
|
|
|
|
'src/node_http_parser.h',
|
2013-08-11 00:26:11 +02:00
|
|
|
'src/node_internals.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/node_javascript.h',
|
2016-06-18 01:39:05 +02:00
|
|
|
'src/node_mutex.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/node_root_certs.h',
|
|
|
|
'src/node_version.h',
|
2012-10-08 21:24:08 +02:00
|
|
|
'src/node_watchdog.h',
|
2013-06-11 12:52:27 +02:00
|
|
|
'src/node_wrap.h',
|
2016-02-04 02:16:10 +01:00
|
|
|
'src/node_revert.h',
|
build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at https://github.com/joyent/node/pull/7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
https://github.com/joyent/node/pull/7719#issuecomment-54641687
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-05 07:03:24 +02:00
|
|
|
'src/node_i18n.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/pipe_wrap.h',
|
2012-05-16 18:04:24 +02:00
|
|
|
'src/tty_wrap.h',
|
|
|
|
'src/tcp_wrap.h',
|
|
|
|
'src/udp_wrap.h',
|
2015-01-30 12:54:53 +01:00
|
|
|
'src/req-wrap.h',
|
|
|
|
'src/req-wrap-inl.h',
|
2013-05-02 00:40:43 +02:00
|
|
|
'src/string_bytes.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 19:59:07 +01:00
|
|
|
'src/stream_base.h',
|
2015-02-25 18:43:14 +01:00
|
|
|
'src/stream_base-inl.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'src/stream_wrap.h',
|
2012-08-06 21:22:11 +02:00
|
|
|
'src/tree.h',
|
2013-08-11 00:26:11 +02:00
|
|
|
'src/util.h',
|
|
|
|
'src/util-inl.h',
|
2014-06-11 01:36:04 +02:00
|
|
|
'src/util.cc',
|
2015-09-03 10:10:30 +02:00
|
|
|
'src/string_search.cc',
|
2011-08-15 18:35:48 +02:00
|
|
|
'deps/http_parser/http_parser.h',
|
2015-04-03 01:13:43 +02:00
|
|
|
'deps/v8/include/v8.h',
|
|
|
|
'deps/v8/include/v8-debug.h',
|
2011-08-15 18:35:48 +02:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
|
2011-09-05 01:01:53 +02:00
|
|
|
# javascript files to make for an even more pleasant IDE experience
|
|
|
|
'<@(library_files)',
|
2011-10-28 12:10:24 +02:00
|
|
|
# node.gyp is added to the project by default.
|
|
|
|
'common.gypi',
|
2011-08-05 01:40:07 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'defines': [
|
2015-01-08 13:05:51 +01:00
|
|
|
'NODE_ARCH="<(target_arch)"',
|
|
|
|
'NODE_PLATFORM="<(OS)"',
|
|
|
|
'NODE_WANT_INTERNALS=1',
|
2015-07-01 23:47:37 +02:00
|
|
|
# Warn when using deprecated V8 APIs.
|
|
|
|
'V8_DEPRECATION_WARNINGS=1',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
|
|
|
|
2015-06-10 09:05:26 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
'conditions': [
|
2016-03-27 01:17:55 +01:00
|
|
|
[ 'node_shared=="false"', {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCManifestTool': {
|
|
|
|
'EmbedManifest': 'true',
|
|
|
|
'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
'defines': [
|
|
|
|
'NODE_SHARED_MODE',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'node_module_version!=""', {
|
|
|
|
'product_extension': 'so.<(node_module_version)',
|
|
|
|
}]
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'node_use_bundled_v8=="true"', {
|
|
|
|
'dependencies': [
|
|
|
|
'deps/v8/tools/gyp/v8.gyp:v8',
|
|
|
|
'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'node_use_v8_platform=="true"', {
|
|
|
|
'defines': [
|
|
|
|
'NODE_USE_V8_PLATFORM=1',
|
|
|
|
],
|
|
|
|
}, {
|
|
|
|
'defines': [
|
|
|
|
'NODE_USE_V8_PLATFORM=0',
|
|
|
|
],
|
|
|
|
}],
|
2015-06-10 09:05:26 +02:00
|
|
|
[ 'node_tag!=""', {
|
|
|
|
'defines': [ 'NODE_TAG="<(node_tag)"' ],
|
|
|
|
}],
|
2015-08-25 02:13:22 +02:00
|
|
|
[ 'node_v8_options!=""', {
|
|
|
|
'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
|
|
|
|
}],
|
2015-04-04 16:04:49 +02:00
|
|
|
# No node_main.cc for anything except executable
|
|
|
|
[ 'node_target_type!="executable"', {
|
|
|
|
'sources!': [
|
|
|
|
'src/node_main.cc',
|
|
|
|
],
|
|
|
|
}],
|
2015-01-18 07:41:37 +01:00
|
|
|
[ 'node_release_urlbase!=""', {
|
|
|
|
'defines': [
|
|
|
|
'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
|
|
|
|
]
|
|
|
|
}],
|
build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at https://github.com/joyent/node/pull/7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
https://github.com/joyent/node/pull/7719#issuecomment-54641687
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-05 07:03:24 +02:00
|
|
|
[ 'v8_enable_i18n_support==1', {
|
|
|
|
'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
|
|
|
|
'dependencies': [
|
|
|
|
'<(icu_gyp_path):icui18n',
|
|
|
|
'<(icu_gyp_path):icuuc',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'icu_small=="true"', {
|
|
|
|
'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
|
|
|
|
}]],
|
|
|
|
}],
|
2016-03-27 01:17:55 +01:00
|
|
|
[ 'node_use_bundled_v8=="true" and \
|
|
|
|
node_enable_v8_vtunejit=="true" and (target_arch=="x64" or \
|
2015-10-21 18:24:12 +02:00
|
|
|
target_arch=="ia32" or target_arch=="x32")', {
|
|
|
|
'defines': [ 'NODE_ENABLE_VTUNE_PROFILING' ],
|
|
|
|
'dependencies': [
|
|
|
|
'deps/v8/src/third_party/vtune/v8vtune.gyp:v8_vtune'
|
|
|
|
],
|
|
|
|
}],
|
2016-02-07 17:47:14 +01:00
|
|
|
[ 'v8_inspector=="true"', {
|
|
|
|
'defines': [
|
|
|
|
'HAVE_INSPECTOR=1',
|
|
|
|
'V8_INSPECTOR_USE_STL=1',
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'src/inspector_agent.cc',
|
|
|
|
'src/inspector_socket.cc',
|
|
|
|
'src/inspector_socket.h',
|
|
|
|
'src/inspector-agent.h',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
2016-06-14 16:47:54 +02:00
|
|
|
'deps/v8_inspector/platform/v8_inspector/v8_inspector.gyp:v8_inspector_stl',
|
2016-02-07 17:47:14 +01:00
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'deps/v8_inspector',
|
|
|
|
'deps/v8_inspector/deps/wtf', # temporary
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/blink', # for inspector
|
|
|
|
],
|
|
|
|
}, {
|
|
|
|
'defines': [ 'HAVE_INSPECTOR=0' ]
|
|
|
|
}],
|
2011-08-05 01:40:07 +02:00
|
|
|
[ 'node_use_openssl=="true"', {
|
2011-08-06 21:20:15 +02:00
|
|
|
'defines': [ 'HAVE_OPENSSL=1' ],
|
2013-06-11 12:59:10 +02:00
|
|
|
'sources': [
|
|
|
|
'src/node_crypto.cc',
|
|
|
|
'src/node_crypto_bio.cc',
|
2013-08-02 14:16:13 +02:00
|
|
|
'src/node_crypto_clienthello.cc',
|
2013-07-06 05:53:23 +02:00
|
|
|
'src/node_crypto.h',
|
|
|
|
'src/node_crypto_bio.h',
|
2013-08-02 14:16:13 +02:00
|
|
|
'src/node_crypto_clienthello.h',
|
2013-06-11 12:59:10 +02:00
|
|
|
'src/tls_wrap.cc',
|
|
|
|
'src/tls_wrap.h'
|
|
|
|
],
|
2011-08-30 00:01:43 +02:00
|
|
|
'conditions': [
|
2015-10-01 23:28:49 +02:00
|
|
|
['openssl_fips != ""', {
|
|
|
|
'defines': [ 'NODE_FIPS_MODE' ],
|
|
|
|
}],
|
2012-06-20 22:31:49 +02:00
|
|
|
[ 'node_shared_openssl=="false"', {
|
2013-12-11 18:20:17 +01:00
|
|
|
'dependencies': [
|
|
|
|
'./deps/openssl/openssl.gyp:openssl',
|
|
|
|
|
|
|
|
# For tests
|
2014-07-23 21:51:14 +02:00
|
|
|
'./deps/openssl/openssl.gyp:openssl-cli',
|
2013-12-11 18:20:17 +01:00
|
|
|
],
|
2014-07-30 12:54:36 +02:00
|
|
|
# Do not let unused OpenSSL symbols to slip away
|
|
|
|
'conditions': [
|
2015-04-04 16:04:49 +02:00
|
|
|
# -force_load or --whole-archive are not applicable for
|
|
|
|
# the static library
|
|
|
|
[ 'node_target_type!="static_library"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [
|
2015-06-01 23:49:43 +02:00
|
|
|
'-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
|
2015-04-04 16:04:49 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'conditions': [
|
2016-03-27 01:17:55 +01:00
|
|
|
['OS in "linux freebsd" and node_shared=="false"', {
|
2015-04-04 16:04:49 +02:00
|
|
|
'ldflags': [
|
2015-06-01 23:49:43 +02:00
|
|
|
'-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
|
2015-04-04 16:04:49 +02:00
|
|
|
'-Wl,--no-whole-archive',
|
|
|
|
],
|
|
|
|
}],
|
2014-07-30 12:54:36 +02:00
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
2011-08-30 00:01:43 +02:00
|
|
|
}]]
|
2011-08-05 01:40:07 +02:00
|
|
|
}, {
|
|
|
|
'defines': [ 'HAVE_OPENSSL=0' ]
|
|
|
|
}],
|
2011-08-15 18:35:48 +02:00
|
|
|
[ 'node_use_dtrace=="true"', {
|
2012-03-28 19:26:10 +02:00
|
|
|
'defines': [ 'HAVE_DTRACE=1' ],
|
2014-02-20 17:52:26 +01:00
|
|
|
'dependencies': [
|
|
|
|
'node_dtrace_header',
|
|
|
|
'specialize_node_d',
|
|
|
|
],
|
2012-03-28 19:26:10 +02:00
|
|
|
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
|
2014-02-20 17:52:26 +01:00
|
|
|
|
2012-03-28 19:26:10 +02:00
|
|
|
#
|
2013-10-28 20:18:59 +01:00
|
|
|
# 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:
|
2013-03-28 19:36:00 +01:00
|
|
|
#
|
|
|
|
# node_dtrace.o all configurations
|
2013-10-28 20:18:59 +01:00
|
|
|
# node_dtrace_ustack.o not supported on mac and linux
|
2013-03-28 19:36:00 +01:00
|
|
|
# node_dtrace_provider.o All except OS X. "dtrace -G" is not
|
|
|
|
# used on OS X.
|
|
|
|
#
|
|
|
|
# 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.
|
2012-03-28 19:26:10 +02:00
|
|
|
#
|
2013-10-28 20:18:59 +01:00
|
|
|
'sources': [ 'src/node_dtrace.cc' ],
|
|
|
|
'conditions': [
|
|
|
|
[ 'OS=="linux"', {
|
|
|
|
'sources': [
|
2014-12-03 07:55:53 +01:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
|
2013-10-28 20:18:59 +01:00
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'OS!="mac" and OS!="linux"', {
|
2013-03-28 19:36:00 +01:00
|
|
|
'sources': [
|
|
|
|
'src/node_dtrace_ustack.cc',
|
|
|
|
'src/node_dtrace_provider.cc',
|
|
|
|
]
|
|
|
|
}
|
|
|
|
] ]
|
2012-03-28 19:26:10 +02:00
|
|
|
} ],
|
2015-01-22 13:35:16 +01:00
|
|
|
[ 'node_use_lttng=="true"', {
|
|
|
|
'defines': [ 'HAVE_LTTNG=1' ],
|
|
|
|
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
|
|
|
|
'libraries': [ '-llttng-ust' ],
|
|
|
|
'sources': [
|
|
|
|
'src/node_lttng.cc'
|
|
|
|
],
|
|
|
|
} ],
|
2012-06-12 01:23:17 +02:00
|
|
|
[ 'node_use_etw=="true"', {
|
|
|
|
'defines': [ 'HAVE_ETW=1' ],
|
|
|
|
'dependencies': [ 'node_etw' ],
|
|
|
|
'sources': [
|
|
|
|
'src/node_win32_etw_provider.h',
|
|
|
|
'src/node_win32_etw_provider-inl.h',
|
|
|
|
'src/node_win32_etw_provider.cc',
|
|
|
|
'src/node_dtrace.cc',
|
2013-01-03 23:36:04 +01:00
|
|
|
'tools/msvs/genfiles/node_etw_provider.h',
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.rc',
|
2012-06-12 01:23:17 +02:00
|
|
|
]
|
|
|
|
} ],
|
2012-11-21 00:27:22 +01:00
|
|
|
[ 'node_use_perfctr=="true"', {
|
|
|
|
'defines': [ 'HAVE_PERFCTR=1' ],
|
|
|
|
'dependencies': [ 'node_perfctr' ],
|
|
|
|
'sources': [
|
|
|
|
'src/node_win32_perfctr_provider.h',
|
|
|
|
'src/node_win32_perfctr_provider.cc',
|
|
|
|
'src/node_counters.cc',
|
|
|
|
'src/node_counters.h',
|
2013-01-03 23:36:04 +01:00
|
|
|
'tools/msvs/genfiles/node_perfctr_provider.rc',
|
2012-11-21 00:27:22 +01:00
|
|
|
]
|
|
|
|
} ],
|
2016-03-23 02:05:54 +01:00
|
|
|
[ 'node_no_browser_globals=="true"', {
|
|
|
|
'defines': [ 'NODE_NO_BROWSER_GLOBALS' ],
|
|
|
|
} ],
|
2016-03-27 01:17:55 +01:00
|
|
|
[ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true"', {
|
2013-04-03 09:35:39 +02:00
|
|
|
'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
|
2015-04-04 16:04:49 +02:00
|
|
|
'conditions': [
|
|
|
|
# -force_load is not applicable for the static library
|
|
|
|
[ 'node_target_type!="static_library"', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [
|
|
|
|
'-Wl,-force_load,<(V8_BASE)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2013-04-03 09:35:39 +02:00
|
|
|
}],
|
2012-02-27 00:02:21 +01:00
|
|
|
[ 'node_shared_zlib=="false"', {
|
|
|
|
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
|
|
|
|
}],
|
|
|
|
|
2012-10-23 15:01:26 +02:00
|
|
|
[ 'node_shared_http_parser=="false"', {
|
|
|
|
'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
|
|
|
|
}],
|
|
|
|
|
2016-03-17 23:25:17 +01:00
|
|
|
[ 'node_shared_cares=="false"', {
|
|
|
|
'dependencies': [ 'deps/cares/cares.gyp:cares' ],
|
|
|
|
}],
|
|
|
|
|
2012-10-24 01:54:22 +02:00
|
|
|
[ 'node_shared_libuv=="false"', {
|
|
|
|
'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
|
|
|
|
}],
|
2012-10-23 16:27:19 +02:00
|
|
|
|
2011-08-04 02:01:30 +02:00
|
|
|
[ 'OS=="win"', {
|
2011-08-07 07:11:21 +02:00
|
|
|
'sources': [
|
2016-05-13 17:36:50 +02:00
|
|
|
'src/backtrace_win32.cc',
|
2012-06-13 17:40:50 +02:00
|
|
|
'src/res/node.rc',
|
2011-08-07 07:11:21 +02:00
|
|
|
],
|
2015-01-19 17:25:23 +01:00
|
|
|
'defines!': [
|
|
|
|
'NODE_PLATFORM="win"',
|
|
|
|
],
|
2011-08-04 02:01:30 +02:00
|
|
|
'defines': [
|
2011-08-07 07:11:21 +02:00
|
|
|
'FD_SETSIZE=1024',
|
2011-08-07 19:43:24 +02:00
|
|
|
# we need to use node's preferred "win32" rather than gyp's preferred "win"
|
2015-01-09 13:38:09 +01:00
|
|
|
'NODE_PLATFORM="win32"',
|
2012-02-16 20:20:07 +01:00
|
|
|
'_UNICODE=1',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
2011-09-02 21:53:16 +02:00
|
|
|
'libraries': [ '-lpsapi.lib' ]
|
2012-07-13 01:43:14 +02:00
|
|
|
}, { # POSIX
|
2011-08-05 01:40:07 +02:00
|
|
|
'defines': [ '__POSIX__' ],
|
2016-05-13 17:36:50 +02:00
|
|
|
'sources': [ 'src/backtrace_posix.cc' ],
|
2011-08-04 02:01:30 +02:00
|
|
|
}],
|
|
|
|
[ 'OS=="mac"', {
|
2014-08-06 20:00:31 +02:00
|
|
|
# linking Corefoundation is needed since certain OSX debugging tools
|
|
|
|
# like Instruments require it for some features
|
|
|
|
'libraries': [ '-framework CoreFoundation' ],
|
2012-01-11 23:44:39 +01:00
|
|
|
'defines!': [
|
2015-01-09 13:38:09 +01:00
|
|
|
'NODE_PLATFORM="mac"',
|
2012-01-11 23:44:39 +01:00
|
|
|
],
|
2012-01-11 23:36:27 +01:00
|
|
|
'defines': [
|
|
|
|
# we need to use node's preferred "darwin" rather than gyp's preferred "mac"
|
2015-01-09 13:38:09 +01:00
|
|
|
'NODE_PLATFORM="darwin"',
|
2012-01-11 23:36:27 +01:00
|
|
|
],
|
2011-08-16 02:54:47 +02:00
|
|
|
}],
|
2011-08-17 07:44:53 +02:00
|
|
|
[ 'OS=="freebsd"', {
|
|
|
|
'libraries': [
|
|
|
|
'-lutil',
|
|
|
|
'-lkvm',
|
|
|
|
],
|
|
|
|
}],
|
2015-08-12 17:53:33 +02:00
|
|
|
[ 'OS=="aix"', {
|
|
|
|
'defines': [
|
|
|
|
'_LINUX_SOURCE_COMPAT',
|
|
|
|
],
|
|
|
|
}],
|
2011-10-26 07:11:20 +02:00
|
|
|
[ 'OS=="solaris"', {
|
|
|
|
'libraries': [
|
|
|
|
'-lkstat',
|
2012-07-27 19:56:40 +02:00
|
|
|
'-lumem',
|
2011-10-26 07:11:20 +02:00
|
|
|
],
|
2012-08-29 23:57:25 +02:00
|
|
|
'defines!': [
|
2015-01-09 13:38:09 +01:00
|
|
|
'NODE_PLATFORM="solaris"',
|
2012-08-29 23:57:25 +02:00
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
# we need to use node's preferred "sunos"
|
|
|
|
# rather than gyp's preferred "solaris"
|
2015-01-09 13:38:09 +01:00
|
|
|
'NODE_PLATFORM="sunos"',
|
2012-08-29 23:57:25 +02:00
|
|
|
],
|
2011-10-26 07:11:20 +02:00
|
|
|
}],
|
2016-03-27 01:17:55 +01:00
|
|
|
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"', {
|
2015-04-03 01:13:43 +02:00
|
|
|
'ldflags': [ '-Wl,-z,noexecstack',
|
|
|
|
'-Wl,--whole-archive <(V8_BASE)',
|
|
|
|
'-Wl,--no-whole-archive' ]
|
2014-05-03 03:55:35 +02:00
|
|
|
}],
|
|
|
|
[ 'OS=="sunos"', {
|
|
|
|
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
|
|
|
|
}],
|
2011-08-13 20:17:47 +02:00
|
|
|
],
|
2011-08-04 02:01:30 +02:00
|
|
|
},
|
2012-06-12 01:23:17 +02:00
|
|
|
# generate ETW header and resource files
|
|
|
|
{
|
|
|
|
'target_name': 'node_etw',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2016-03-11 11:26:20 +01:00
|
|
|
[ 'node_use_etw=="true"', {
|
2012-06-12 01:23:17 +02:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_etw',
|
|
|
|
'inputs': [ 'src/res/node_etw_provider.man' ],
|
2012-10-26 01:51:46 +02:00
|
|
|
'outputs': [
|
2013-01-03 23:36:04 +01:00
|
|
|
'tools/msvs/genfiles/node_etw_provider.rc',
|
|
|
|
'tools/msvs/genfiles/node_etw_provider.h',
|
|
|
|
'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
|
2012-10-26 01:51:46 +02:00
|
|
|
],
|
2013-01-03 23:36:04 +01:00
|
|
|
'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
|
2012-06-12 01:23:17 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
} ]
|
|
|
|
]
|
|
|
|
},
|
2012-11-21 00:27:22 +01:00
|
|
|
# generate perf counter header and resource files
|
|
|
|
{
|
|
|
|
'target_name': 'node_perfctr',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2016-03-11 11:26:20 +01:00
|
|
|
[ 'node_use_perfctr=="true"', {
|
2012-11-21 00:27:22 +01:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_perfctr_man',
|
|
|
|
'inputs': [ 'src/res/node_perfctr_provider.man' ],
|
|
|
|
'outputs': [
|
2013-01-03 23:36:04 +01:00
|
|
|
'tools/msvs/genfiles/node_perfctr_provider.h',
|
|
|
|
'tools/msvs/genfiles/node_perfctr_provider.rc',
|
|
|
|
'tools/msvs/genfiles/MSG00001.BIN',
|
2012-11-21 00:27:22 +01:00
|
|
|
],
|
|
|
|
'action': [ 'ctrpp <@(_inputs) '
|
2013-01-03 23:36:04 +01:00
|
|
|
'-o tools/msvs/genfiles/node_perfctr_provider.h '
|
|
|
|
'-rc tools/msvs/genfiles/node_perfctr_provider.rc'
|
2012-11-21 00:27:22 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} ]
|
|
|
|
]
|
|
|
|
},
|
2011-08-04 02:01:30 +02:00
|
|
|
{
|
|
|
|
'target_name': 'node_js2c',
|
|
|
|
'type': 'none',
|
|
|
|
'toolsets': ['host'],
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_js2c',
|
|
|
|
'inputs': [
|
|
|
|
'<@(library_files)',
|
2012-03-14 16:34:44 +01:00
|
|
|
'./config.gypi',
|
2011-08-04 02:01:30 +02:00
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
|
|
|
|
],
|
2011-08-05 01:40:07 +02:00
|
|
|
'conditions': [
|
2013-10-28 20:18:59 +01:00
|
|
|
[ 'node_use_dtrace=="false" and node_use_etw=="false"', {
|
|
|
|
'inputs': [ 'src/notrace_macros.py' ]
|
2013-07-24 12:53:28 +02:00
|
|
|
}],
|
2015-01-22 13:35:16 +01:00
|
|
|
['node_use_lttng=="false"', {
|
|
|
|
'inputs': [ 'src/nolttng_macros.py' ]
|
|
|
|
}],
|
2012-11-21 00:27:22 +01:00
|
|
|
[ 'node_use_perfctr=="false"', {
|
|
|
|
'inputs': [ 'src/perfctr_macros.py' ]
|
|
|
|
}]
|
|
|
|
],
|
2013-07-24 12:53:28 +02:00
|
|
|
'action': [
|
2016-01-24 17:01:07 +01:00
|
|
|
'python',
|
2013-07-24 12:53:28 +02:00
|
|
|
'tools/js2c.py',
|
|
|
|
'<@(_outputs)',
|
|
|
|
'<@(_inputs)',
|
|
|
|
],
|
2011-08-04 02:01:30 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}, # end node_js2c
|
2012-03-28 19:26:10 +02:00
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_header',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2014-12-11 18:04:31 +01:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="linux"', {
|
2012-03-28 19:26:10 +02: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 20:02:39 +01: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 19:26:10 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_provider',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2013-10-28 20:18:59 +01:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
|
2012-03-28 19:26:10 +02:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_provider_o',
|
|
|
|
'inputs': [
|
2015-08-13 18:14:34 +02:00
|
|
|
'<(OBJ_DIR)/node/src/node_dtrace.o',
|
2012-03-28 19:26:10 +02:00
|
|
|
],
|
|
|
|
'outputs': [
|
2015-08-13 18:14:34 +02:00
|
|
|
'<(OBJ_DIR)/node/src/node_dtrace_provider.o'
|
2012-03-28 19:26:10 +02:00
|
|
|
],
|
2013-04-17 01:18:07 +02:00
|
|
|
'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
|
2014-12-03 07:55:53 +01:00
|
|
|
'<@(_inputs)', '-o', '<@(_outputs)' ]
|
2012-03-28 19:26:10 +02:00
|
|
|
}
|
|
|
|
]
|
2013-10-28 20:18:59 +01: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 07:55:53 +01:00
|
|
|
}
|
2013-10-28 20:18:59 +01:00
|
|
|
],
|
|
|
|
}],
|
2012-03-28 19:26:10 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'node_dtrace_ustack',
|
|
|
|
'type': 'none',
|
|
|
|
'conditions': [
|
2013-10-28 20:18:59 +01:00
|
|
|
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
|
2012-03-28 19:26:10 +02:00
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'node_dtrace_ustack_constants',
|
|
|
|
'inputs': [
|
2014-01-16 17:39:12 +01:00
|
|
|
'<(V8_BASE)'
|
2012-03-28 19:26:10 +02: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': [
|
2015-08-13 18:14:34 +02:00
|
|
|
'<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
|
2012-03-28 19:26:10 +02:00
|
|
|
],
|
2013-02-26 08:57:12 +01:00
|
|
|
'conditions': [
|
|
|
|
[ 'target_arch=="ia32"', {
|
|
|
|
'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 19:26:10 +02:00
|
|
|
]
|
2014-02-20 17:52:26 +01:00
|
|
|
},
|
2012-03-28 19:26:10 +02:00
|
|
|
]
|
|
|
|
} ],
|
|
|
|
]
|
2014-02-20 17:52:26 +01: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)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
} ],
|
|
|
|
]
|
2015-03-19 02:01:45 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'cctest',
|
|
|
|
'type': 'executable',
|
2016-06-29 21:11:14 +02:00
|
|
|
'dependencies': [ 'deps/gtest/gtest.gyp:gtest' ],
|
2015-03-19 02:01:45 +01:00
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
2015-04-03 01:13:43 +02:00
|
|
|
'deps/v8/include'
|
2015-03-19 02:01:45 +01:00
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
# gtest's ASSERT macros conflict with our own.
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_EQ=1',
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_GE=1',
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_GT=1',
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_LE=1',
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_LT=1',
|
|
|
|
'GTEST_DONT_DEFINE_ASSERT_NE=1',
|
2016-05-24 09:54:05 +02:00
|
|
|
'NODE_WANT_INTERNALS=1',
|
2015-03-19 02:01:45 +01:00
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'test/cctest/util.cc',
|
|
|
|
],
|
2016-02-07 17:47:14 +01:00
|
|
|
|
|
|
|
'conditions': [
|
|
|
|
['v8_inspector=="true"', {
|
|
|
|
'dependencies': [
|
|
|
|
'deps/openssl/openssl.gyp:openssl',
|
|
|
|
'deps/http_parser/http_parser.gyp:http_parser',
|
|
|
|
'deps/uv/uv.gyp:libuv'
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'src/inspector_socket.cc',
|
|
|
|
'test/cctest/test_inspector_socket.cc'
|
|
|
|
]
|
2016-03-27 01:17:55 +01:00
|
|
|
}],
|
|
|
|
[ 'node_use_v8_platform=="true"', {
|
|
|
|
'dependencies': [
|
|
|
|
'deps/v8/tools/gyp/v8.gyp:v8_libplatform',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'node_use_bundled_v8=="true"', {
|
|
|
|
'dependencies': [
|
|
|
|
'deps/v8/tools/gyp/v8.gyp:v8',
|
|
|
|
'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
|
|
|
|
],
|
|
|
|
}],
|
2016-02-07 17:47:14 +01:00
|
|
|
]
|
2012-03-28 19:26:10 +02:00
|
|
|
}
|
2015-09-29 16:22:00 +02:00
|
|
|
], # end targets
|
|
|
|
|
|
|
|
'conditions': [
|
|
|
|
['OS=="aix"', {
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'node',
|
|
|
|
'type': 'executable',
|
|
|
|
'dependencies': ['<(node_core_target_name)', 'node_exp'],
|
|
|
|
|
|
|
|
'include_dirs': [
|
|
|
|
'src',
|
|
|
|
'deps/v8/include',
|
|
|
|
],
|
|
|
|
|
|
|
|
'sources': [
|
|
|
|
'src/node_main.cc',
|
|
|
|
'<@(library_files)',
|
|
|
|
# node.gyp is added to the project by default.
|
|
|
|
'common.gypi',
|
|
|
|
],
|
|
|
|
|
2016-07-04 11:11:10 +02:00
|
|
|
'ldflags': ['-Wl,-bE:<(PRODUCT_DIR)/node.exp'],
|
2015-09-29 16:22:00 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'node_exp',
|
|
|
|
'type': 'none',
|
|
|
|
'dependencies': [
|
|
|
|
'<(node_core_target_name)',
|
|
|
|
],
|
|
|
|
'actions': [
|
|
|
|
{
|
|
|
|
'action_name': 'expfile',
|
|
|
|
'inputs': [
|
|
|
|
'<(OBJ_DIR)'
|
|
|
|
],
|
|
|
|
'outputs': [
|
|
|
|
'<(PRODUCT_DIR)/node.exp'
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'sh', 'tools/create_expfile.sh',
|
|
|
|
'<@(_inputs)', '<@(_outputs)'
|
|
|
|
],
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
], # end targets
|
|
|
|
}], # end aix section
|
|
|
|
], # end conditions block
|
2011-08-04 02:01:30 +02:00
|
|
|
}
|