Skip to content

Commit 50d1014

Browse files
committed
chakrashim: Make --v8-options work
There was a feedback that with node + chakracore people rely on `--v8-options` switch and expect to get options text. Implemented it for chakrashim which just prints options available to node running with chakracore engine. PR-URL: nodejs/node-chakracore#30 Reviewed-By: Sandeep Agarwal <agarwal.sandeep@microsoft.com> Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com> Fixes: nodejs#10
1 parent 8932128 commit 50d1014

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

deps/chakrashim/src/v8v8.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ void V8::SetFlagsFromCommandLine(int *argc, char **argv, bool remove_flags) {
102102
|| startsWith(arg, "--harmony")
103103
|| startsWith(arg, "--stack-size="))) {
104104
argv[i] = nullptr;
105+
} else if (equals("--help", arg)) {
106+
char* helpText =
107+
"Options:\n"
108+
" --use_strict (enforce strict mode)\n"
109+
" type: bool default: false\n"
110+
" --expose_gc (expose gc extension)\n"
111+
" type: bool default: false\n"
112+
" --harmony (Ignored in node running with chakracore)\n"
113+
" --debug (Ignored in node running with chakracore)\n"
114+
" --stack-size (Ignored in node running with chakracore)\n";
115+
fprintf(stdout, helpText);
116+
exit(0);
105117
}
106118
}
107119

0 commit comments

Comments
 (0)