Skip to content

Commit f045387

Browse files
committed
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: #32984 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent ef9964f commit f045387

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/snapshot/node_mksnapshot.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@ int main(int argc, char* argv[]) {
3333
return 1;
3434
}
3535

36+
// Windows needs conversion from wchar_t to char. See node_main.cc
37+
#ifdef _WIN32
3638
int node_argc = 1;
3739
char argv0[] = "node";
3840
char* node_argv[] = {argv0, nullptr};
39-
4041
node::InitializationResult result =
4142
node::InitializeOncePerProcess(node_argc, node_argv);
43+
#else
44+
node::InitializationResult result =
45+
node::InitializeOncePerProcess(argc, argv);
46+
#endif
47+
4248
CHECK(!result.early_return);
4349
CHECK_EQ(result.exit_code, 0);
4450

0 commit comments

Comments
 (0)