diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-18 16:26:48 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-23 11:26:01 +0800 |
commit | d7016679509cd7f2d50612369509e8797d8157b0 (patch) | |
tree | e9d77bbe56e71b6c5ddb3b86547362f550ea2148 /node.gyp | |
parent | ffcc949f1cb72c19e4c7db6704ae02d0f7dac232 (diff) | |
download | android-node-v8-d7016679509cd7f2d50612369509e8797d8157b0.tar.gz android-node-v8-d7016679509cd7f2d50612369509e8797d8157b0.tar.bz2 android-node-v8-d7016679509cd7f2d50612369509e8797d8157b0.zip |
tools: implement node_mksnapshot
Implements a node_mksnapshot target that generates a snapshot blob
from a Node.js main instance's isolate, and serializes the data blob
with other additional data into a C++ file that can be embedded into
the Node.js binary.
PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 42 |
1 files changed, 41 insertions, 1 deletions
@@ -1156,7 +1156,47 @@ }], ], }, # mkcodecache - ], # end targets + { + 'target_name': 'node_mksnapshot', + 'type': 'executable', + + 'dependencies': [ + '<(node_lib_target_name)', + 'deps/histogram/histogram.gyp:histogram', + ], + + 'includes': [ + 'node.gypi' + ], + + 'include_dirs': [ + 'src', + 'tools/msvs/genfiles', + 'deps/v8/include', + 'deps/cares/include', + 'deps/uv/include', + ], + + 'defines': [ 'NODE_WANT_INTERNALS=1' ], + + 'sources': [ + 'src/node_code_cache_stub.cc', + 'tools/snapshot/node_mksnapshot.cc', + 'tools/snapshot/snapshot_builder.cc', + 'tools/snapshot/snapshot_builder.h', + ], + + 'conditions': [ + [ 'node_report=="true"', { + 'conditions': [ + ['OS=="win"', { + 'libraries': [ 'Ws2_32' ], + }], + ], + }], + ], + }, # node_mksnapshot + ], # end targets 'conditions': [ ['OS=="aix" and node_shared=="true"', { |