diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2022-03-24 16:37:08 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2022-03-31 14:29:12 +0300 |
commit | 37aee80643822c8c9ff35c906d034ecc8fc448d5 (patch) | |
tree | 65a9107f2ed3b7e4cdaf38936a1df65ccd25a587 /src/node_options.cc | |
parent | 8a297ba3a0aa39afb7c84fceee4accff609b7cfe (diff) |
build: add --node-snapshot-main configure option
This adds a --build-snapshot runtime option which is currently only
supported by the node_mksnapshot binary, and a --node-snapshot-main
configure option that makes use it to run a custom script when
building the embedded snapshot. The idea is to have this experimental
feature in core as a configure-time feature for now, and investigate
the renaming V8 bugs before we make it available to more users via
making it a runtime option.
PR-URL: https://github.com/nodejs/node/pull/42466
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'src/node_options.cc')
-rw-r--r-- | src/node_options.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node_options.cc b/src/node_options.cc index 35ee54d2231..bb568ce458a 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -725,6 +725,11 @@ PerProcessOptionsParser::PerProcessOptionsParser( "disable Object.prototype.__proto__", &PerProcessOptions::disable_proto, kAllowedInEnvironment); + AddOption("--build-snapshot", + "Generate a snapshot blob when the process exits." + "Currently only supported in the node_mksnapshot binary.", + &PerProcessOptions::build_snapshot, + kDisallowedInEnvironment); // 12.x renamed this inadvertently, so alias it for consistency within the // release line, while using the original name for consistency with older |