Commit 453e86df authored by Seth Brenith's avatar Seth Brenith Committed by Commit Bot

add d8 --help text explaining how to use options

Flag syntax is explained in a comment in flags.h, but we can make d8
easier to learn for new people if we also expose that explanation in the
--help text.

Change-Id: I7fd9ad0e545c2d9110119c0283bb14d665bcf19e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1555061Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60682}
parent 57582090
......@@ -584,6 +584,14 @@ void FlagList::PrintHelp() {
" --shell run an interactive JavaScript shell\n"
" --module execute a file as a JavaScript module\n\n"
"Note: the --module option is implicitly enabled for *.mjs files.\n\n"
"The following syntax for options is accepted (both '-' and '--' are "
"ok):\n"
" --flag (bool flags only)\n"
" --noflag (bool flags only)\n"
" --flag=value (non-bool flags only, no spaces around '=')\n"
" --flag value (non-bool flags only)\n"
" -- (equivalent to --js_arguments, captures all remaining "
"args)\n\n"
"Options:\n";
for (const Flag& f : flags) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment