mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 19:34:12 +00:00
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:
committed by
Andreas Rumpf
parent
1d9b88f25d
commit
7072e3ddca
@@ -102,10 +102,8 @@ proc writeVersionInfo(conf: ConfigRef; pass: TCmdLinePass) =
|
||||
{msgStdout})
|
||||
msgQuit(0)
|
||||
|
||||
proc writeCommandLineUsage*(conf: ConfigRef; helpWritten: var bool) =
|
||||
if not helpWritten:
|
||||
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})
|
||||
helpWritten = true
|
||||
proc writeCommandLineUsage*(conf: ConfigRef) =
|
||||
msgWriteln(conf, getCommandLineDesc(conf), {msgStdout})
|
||||
|
||||
proc addPrefix(switch: string): string =
|
||||
if len(switch) == 1: result = "-" & switch
|
||||
|
||||
@@ -68,7 +68,7 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
||||
)
|
||||
self.initDefinesProg(conf, "nim_compiler")
|
||||
if paramCount() == 0:
|
||||
writeCommandLineUsage(conf, conf.helpWritten)
|
||||
writeCommandLineUsage(conf)
|
||||
return
|
||||
|
||||
self.processCmdLineAndProjectPath(conf)
|
||||
|
||||
@@ -194,7 +194,6 @@ type
|
||||
features*: set[Feature]
|
||||
arguments*: string ## the arguments to be passed to the program that
|
||||
## should be run
|
||||
helpWritten*: bool
|
||||
ideCmd*: IdeCmd
|
||||
oldNewlines*: bool
|
||||
cCompiler*: TSystemCC
|
||||
|
||||
@@ -16,6 +16,17 @@ Advanced commands:
|
||||
see also: --dump.format:json (useful with: ` | jq`)
|
||||
//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:
|
||||
-o:FILE, --out:FILE set the output filename
|
||||
--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
|
||||
--experimental:$1
|
||||
enable experimental language feature
|
||||
-v, --version show detailed version information
|
||||
--profiler:on|off Enable profiling; requires `import nimprof`, and
|
||||
works better with `--stackTrace:on`
|
||||
see also https://nim-lang.github.io/Nim/estp.html
|
||||
|
||||
@@ -8,6 +8,7 @@ Command:
|
||||
|
||||
Arguments:
|
||||
arguments are passed to the program being run (if --run option is selected)
|
||||
|
||||
Options:
|
||||
-p, --path:PATH add path to search paths
|
||||
-d, --define:SYMBOL(:VAL)
|
||||
@@ -20,16 +21,7 @@ Options:
|
||||
--lineTrace:on|off turn line tracing on|off
|
||||
--threads:on|off turn support for multi-threading 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
|
||||
--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
|
||||
Note: use -d:release for a release build!
|
||||
--debugger:native|endb use native debugger (gdb) | ENDB (experimental)
|
||||
@@ -38,5 +30,6 @@ Options:
|
||||
-r, --run run the compiled program with given arguments
|
||||
--fullhelp show all command line switches
|
||||
-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.
|
||||
|
||||
Reference in New Issue
Block a user