doc: move specific checks to advanced options, for a less intimidatin… (#10779)
* doc: move specific checks to advanced options, for a less intimidating help * remove useless bool
This commit is contained in:
parent
1d9b88f25d
commit
7072e3ddca
5 changed files with 16 additions and 16 deletions
|
|
@ -102,10 +102,8 @@ proc writeVersionInfo(conf: ConfigRef; pass: TCmdLinePass) =
|
||||||
{msgStdout})
|
{msgStdout})
|
||||||
msgQuit(0)
|
msgQuit(0)
|
||||||
|
|
||||||
proc writeCommandLineUsage*(conf: ConfigRef; helpWritten: var bool) =
|
proc writeCommandLineUsage*(conf: ConfigRef) =
|
||||||
if not helpWritten:
|
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})
|
||||||
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})
|
|
||||||
helpWritten = true
|
|
||||||
|
|
||||||
proc addPrefix(switch: string): string =
|
proc addPrefix(switch: string): string =
|
||||||
if len(switch) == 1: result = "-" & switch
|
if len(switch) == 1: result = "-" & switch
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
||||||
)
|
)
|
||||||
self.initDefinesProg(conf, "nim_compiler")
|
self.initDefinesProg(conf, "nim_compiler")
|
||||||
if paramCount() == 0:
|
if paramCount() == 0:
|
||||||
writeCommandLineUsage(conf, conf.helpWritten)
|
writeCommandLineUsage(conf)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.processCmdLineAndProjectPath(conf)
|
self.processCmdLineAndProjectPath(conf)
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,6 @@ type
|
||||||
features*: set[Feature]
|
features*: set[Feature]
|
||||||
arguments*: string ## the arguments to be passed to the program that
|
arguments*: string ## the arguments to be passed to the program that
|
||||||
## should be run
|
## should be run
|
||||||
helpWritten*: bool
|
|
||||||
ideCmd*: IdeCmd
|
ideCmd*: IdeCmd
|
||||||
oldNewlines*: bool
|
oldNewlines*: bool
|
||||||
cCompiler*: TSystemCC
|
cCompiler*: TSystemCC
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,17 @@ Advanced commands:
|
||||||
see also: --dump.format:json (useful with: ` | jq`)
|
see also: --dump.format:json (useful with: ` | jq`)
|
||||||
//check checks the project for syntax and semantic
|
//check checks the project for syntax and semantic
|
||||||
|
|
||||||
|
Runtime checks (see -x):
|
||||||
|
--objChecks:on|off turn obj conversion checks on|off
|
||||||
|
--fieldChecks:on|off turn case variant field checks on|off
|
||||||
|
--rangeChecks:on|off turn range checks on|off
|
||||||
|
--boundChecks:on|off turn bound checks on|off
|
||||||
|
--overflowChecks:on|off turn int over-/underflow checks on|off
|
||||||
|
--floatChecks:on|off turn all floating point (NaN/Inf) checks on|off
|
||||||
|
--nanChecks:on|off turn NaN checks on|off
|
||||||
|
--infChecks:on|off turn Inf checks on|off
|
||||||
|
--nilChecks:on|off turn nil checks on|off
|
||||||
|
|
||||||
Advanced options:
|
Advanced options:
|
||||||
-o:FILE, --out:FILE set the output filename
|
-o:FILE, --out:FILE set the output filename
|
||||||
--outdir:DIR set the path where the output file will be written
|
--outdir:DIR set the path where the output file will be written
|
||||||
|
|
@ -109,7 +120,6 @@ Advanced options:
|
||||||
--errorMax:N stop compilation after N errors; 0 means unlimited
|
--errorMax:N stop compilation after N errors; 0 means unlimited
|
||||||
--experimental:$1
|
--experimental:$1
|
||||||
enable experimental language feature
|
enable experimental language feature
|
||||||
-v, --version show detailed version information
|
|
||||||
--profiler:on|off Enable profiling; requires `import nimprof`, and
|
--profiler:on|off Enable profiling; requires `import nimprof`, and
|
||||||
works better with `--stackTrace:on`
|
works better with `--stackTrace:on`
|
||||||
see also https://nim-lang.github.io/Nim/estp.html
|
see also https://nim-lang.github.io/Nim/estp.html
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ Command:
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
arguments are passed to the program being run (if --run option is selected)
|
arguments are passed to the program being run (if --run option is selected)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-p, --path:PATH add path to search paths
|
-p, --path:PATH add path to search paths
|
||||||
-d, --define:SYMBOL(:VAL)
|
-d, --define:SYMBOL(:VAL)
|
||||||
|
|
@ -20,16 +21,7 @@ Options:
|
||||||
--lineTrace:on|off turn line tracing on|off
|
--lineTrace:on|off turn line tracing on|off
|
||||||
--threads:on|off turn support for multi-threading on|off
|
--threads:on|off turn support for multi-threading on|off
|
||||||
-x, --checks:on|off turn all runtime checks on|off
|
-x, --checks:on|off turn all runtime checks on|off
|
||||||
--objChecks:on|off turn obj conversion checks on|off
|
|
||||||
--fieldChecks:on|off turn case variant field checks on|off
|
|
||||||
--rangeChecks:on|off turn range checks on|off
|
|
||||||
--boundChecks:on|off turn bound checks on|off
|
|
||||||
--overflowChecks:on|off turn int over-/underflow checks on|off
|
|
||||||
-a, --assertions:on|off turn assertions on|off
|
-a, --assertions:on|off turn assertions on|off
|
||||||
--floatChecks:on|off turn all floating point (NaN/Inf) checks on|off
|
|
||||||
--nanChecks:on|off turn NaN checks on|off
|
|
||||||
--infChecks:on|off turn Inf checks on|off
|
|
||||||
--nilChecks:on|off turn nil checks on|off
|
|
||||||
--opt:none|speed|size optimize not at all or for speed|size
|
--opt:none|speed|size optimize not at all or for speed|size
|
||||||
Note: use -d:release for a release build!
|
Note: use -d:release for a release build!
|
||||||
--debugger:native|endb use native debugger (gdb) | ENDB (experimental)
|
--debugger:native|endb use native debugger (gdb) | ENDB (experimental)
|
||||||
|
|
@ -38,5 +30,6 @@ Options:
|
||||||
-r, --run run the compiled program with given arguments
|
-r, --run run the compiled program with given arguments
|
||||||
--fullhelp show all command line switches
|
--fullhelp show all command line switches
|
||||||
-h, --help show this help
|
-h, --help show this help
|
||||||
|
-v, --version show detailed version information
|
||||||
|
|
||||||
Note, single letter options that take an argument require a colon. E.g. -p:PATH.
|
Note, single letter options that take an argument require a colon. E.g. -p:PATH.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue