Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: Make --v8-options work
Browse files Browse the repository at this point in the history
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: #30
Reviewed-By: Sandeep Agarwal <agarwal.sandeep@microsoft.com>
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
Fixes: #10
  • Loading branch information
kunalspathak committed Feb 29, 2016
1 parent 8932128 commit 50d1014
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deps/chakrashim/src/v8v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ void V8::SetFlagsFromCommandLine(int *argc, char **argv, bool remove_flags) {
|| startsWith(arg, "--harmony")
|| startsWith(arg, "--stack-size="))) {
argv[i] = nullptr;
} else if (equals("--help", arg)) {
char* helpText =
"Options:\n"
" --use_strict (enforce strict mode)\n"
" type: bool default: false\n"
" --expose_gc (expose gc extension)\n"
" type: bool default: false\n"
" --harmony (Ignored in node running with chakracore)\n"
" --debug (Ignored in node running with chakracore)\n"
" --stack-size (Ignored in node running with chakracore)\n";
fprintf(stdout, helpText);
exit(0);
}
}

Expand Down

0 comments on commit 50d1014

Please sign in to comment.