mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
tools: enable Node.js command line flags in node_mksnapshot
Pass the flags down to node_mksnapshot so that we can use them when generating the snapshot (e.g. to debug or enable V8 flags) PR-URL: https://github.com/nodejs/node/pull/32984 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit is contained in:
1 file changed
+7
-1
@@ -33,12 +33,18 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Windows needs conversion from wchar_t to char. See node_main.cc
|
||||
#ifdef _WIN32
|
||||
int node_argc = 1;
|
||||
char argv0[] = "node";
|
||||
char* node_argv[] = {argv0, nullptr};
|
||||
|
||||
node::InitializationResult result =
|
||||
node::InitializeOncePerProcess(node_argc, node_argv);
|
||||
#else
|
||||
node::InitializationResult result =
|
||||
node::InitializeOncePerProcess(argc, argv);
|
||||
#endif
|
||||
|
||||
CHECK(!result.early_return);
|
||||
CHECK_EQ(result.exit_code, 0);
|
||||
|
||||
|
||||
Reference in new issue
Block a user