Skip to content

Commit a931fbe

Browse files
prbzrgmbauman
andauthored
Make all command-line options documented in all related files (#53826)
I checked and updated the three related files to make sure command-line documentations are the same in all of them. Previously mentioned in #52645 (comment) --------- Co-authored-by: Matt Bauman <[email protected]>
1 parent 66a4fa7 commit a931fbe

File tree

3 files changed

+72
-52
lines changed

3 files changed

+72
-52
lines changed

doc/man/julia.1

+39-28
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Display version information
5959

6060
.TP
6161
-h, --help
62-
Print help message
62+
Print command-line options (this message)
6363

6464
.TP
6565
--help-hidden
@@ -77,7 +77,7 @@ Start up with the given system image file
7777

7878
.TP
7979
-H, --home <dir>
80-
Set location of julia executable
80+
Set location of `julia` executable
8181

8282
.TP
8383
--startup-file={yes*|no}
@@ -95,39 +95,42 @@ Use native code from system image if available
9595
.TP
9696
--compiled-modules={yes*|no|existing|strict}
9797
Enable or disable incremental precompilation of modules.
98-
The "existing" option allows use of existing compiled modules that were previously precompiled, but disallows creation of new precompile files.
99-
The "strict" option is similar, but will error if no precompile file is found.
98+
The `existing` option allows use of existing compiled modules that were
99+
previously precompiled, but disallows creation of new precompile files.
100+
The `strict` option is similar, but will error if no precompile file is found.
100101

101102
.TP
102103
--pkgimages={yes*|no|existing}
103104
Enable or disable usage of native code caching in the form of pkgimages
105+
The `existing` option allows use of existing pkgimages but disallows creation of new ones
104106

105107
.TP
106108
-e, --eval <expr>
107109
Evaluate <expr>
108110

109-
.TP
110-
-m, --module <Package> [args]
111-
Run entry point of `Package` (`@main` function) with `args'.
112-
113-
114111
.TP
115112
-E, --print <expr>
116113
Evaluate <expr> and display the result
117114

115+
.TP
116+
-m, --module <Package> [args]
117+
Run entry point of `Package` (`@main` function) with `args'
118+
118119
.TP
119120
-L, --load <file>
120121
Load <file> immediately on all processors
121122

122123
.TP
123-
-t, --threads <n>
124-
Enable n threads; "auto" tries to infer a useful default number
125-
of threads to use but the exact behavior might change in the future.
126-
Currently, "auto" uses the number of CPUs assigned to this julia
127-
process based on the OS-specific affinity assignment interface, if
128-
supported (Linux and Windows). If this is not supported (macOS) or
129-
process affinity is not configured, it uses the number of CPU
130-
threads.
124+
-t, --threads {auto|N[,auto|M]}
125+
Enable N[+M] threads; N threads are assigned to the `default`
126+
threadpool, and if M is specified, M threads are assigned to the
127+
`interactive` threadpool; `auto` tries to infer a useful
128+
default number of threads to use but the exact behavior might change
129+
in the future. Currently sets N to the number of CPUs assigned to
130+
this Julia process based on the OS-specific affinity assignment
131+
interface if supported (Linux and Windows) or to the number of CPU
132+
threads if not supported (MacOS) or if process affinity is not
133+
configured, and sets M to 1.
131134

132135
.TP
133136
--gcthreads=N[,M]
@@ -144,15 +147,15 @@ as the number of local CPU threads (logical cores)
144147
Run processes on hosts listed in <file>
145148

146149
.TP
147-
-i
150+
-i, --interactive
148151
Interactive mode; REPL runs and `isinteractive()` is true
149152

150153
.TP
151154
-q, --quiet
152155
Quiet startup: no banner, suppress REPL warnings
153156

154157
.TP
155-
--banner={yes|no|auto*}
158+
--banner={yes|no|short|auto*}
156159
Enable or disable startup banner
157160

158161
.TP
@@ -180,15 +183,15 @@ Enable or disable warning for ambiguous top-level scope
180183
Limit usage of CPU features up to <target>; set to `help` to see the available options
181184

182185
.TP
183-
-O, --optimize={0,1,2*,3}
186+
-O, --optimize={0|1|2*|3}
184187
Set the optimization level (level 3 if `-O` is used without a level)
185188

186189
.TP
187-
--min-optlevel={0*,1,2,3}
190+
--min-optlevel={0*|1|2|3}
188191
Set a lower bound on the optimization level
189192

190193
.TP
191-
-g {0,1*,2}
194+
-g, --debug-info={0|1*|2}
192195
Set the level of debug info generation (level 2 if `-g` is used without a level)
193196

194197
.TP
@@ -203,6 +206,10 @@ Emit bounds checks always, never, or respect @inbounds declarations
203206
--math-mode={ieee|user*}
204207
Always follow `ieee` floating point semantics or respect `@fastmath` declarations
205208

209+
.TP
210+
--polly={yes*|no}
211+
Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)
212+
206213
.TP
207214
--code-coverage[={none*|user|all}]
208215
Count executions of source lines (omitting setting is equivalent to `user`)
@@ -213,17 +220,17 @@ Count executions of source lines in a file or files under a given directory. A `
213220
be placed before the path to indicate this option. A `@` with no path will track the current directory.
214221

215222
.TP
216-
--code-coverage=tracefile.info
217-
Append coverage information to the LCOV tracefile (filename supports format tokens)
223+
--code-coverage=tracefile.info
224+
Append coverage information to the LCOV tracefile (filename supports format tokens)
218225

219226
.TP
220227
--track-allocation[={none*|user|all}]
221228
Count bytes allocated by each source line (omitting setting is equivalent to `user`)
222229

223230
.TP
224231
--track-allocation=@<path>
225-
Count bytes allocated by each source line in a file or files under a given directory. A `@`
226-
must be placed before the path to indicate this option. A `@` with no path will track the current directory.
232+
Count bytes but only in files that fall under the given file path/directory.
233+
The `@` prefix is required to select this option. A `@` with no path will track the current directory.
227234

228235
.TP
229236
--bug-report=KIND
@@ -233,7 +240,7 @@ fallbacks to the latest compatible BugReporting.jl if not. For more information,
233240
--bug-report=help.
234241

235242
.TP
236-
--heap-size-hint=<value>
243+
--heap-size-hint=<size>
237244
Forces garbage collection if memory usage is higher than the given value.
238245
The value may be specified as a number of bytes, optionally in units of
239246
KB, MB, GB, or TB, or as a percentage of physical memory with %.
@@ -275,13 +282,17 @@ Generate an assembly file (.s)
275282
Generate an incremental output file (rather than complete)
276283

277284
.TP
278-
--trace-compile={stderr,name}
285+
--trace-compile={stderr|name}
279286
Print precompile statements for methods compiled during execution or save to a path
280287

281288
.TP
282289
-image-codegen
283290
Force generate code in imaging mode
284291

292+
.TP
293+
--permalloc-pkgimg={yes|no*}
294+
Copy the data section of package images into memory
295+
285296
.SH FILES AND ENVIRONMENT
286297
See https://docs.julialang.org/en/v1/manual/environment-variables/
287298

doc/src/manual/command-line-interface.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -164,44 +164,47 @@ The following is a complete list of command-line switches available when launchi
164164
|Switch |Description|
165165
|:--- |:---|
166166
|`-v`, `--version` |Display version information|
167-
|`-h`, `--help` |Print command-line options (this message).|
168-
|`--help-hidden` |Uncommon options not shown by `-h`|
167+
|`-h`, `--help` |Print command-line options (this message)|
168+
|`--help-hidden` |Print uncommon options not shown by `-h`|
169169
|`--project[={<dir>\|@.}]` |Set `<dir>` as the active project/environment. The default `@.` option will search through parent directories until a `Project.toml` or `JuliaProject.toml` file is found.|
170170
|`-J`, `--sysimage <file>` |Start up with the given system image file|
171171
|`-H`, `--home <dir>` |Set location of `julia` executable|
172172
|`--startup-file={yes*\|no}` |Load `JULIA_DEPOT_PATH/config/startup.jl`; if [`JULIA_DEPOT_PATH`](@ref JULIA_DEPOT_PATH) environment variable is unset, load `~/.julia/config/startup.jl`|
173173
|`--handle-signals={yes*\|no}` |Enable or disable Julia's default signal handlers|
174174
|`--sysimage-native-code={yes*\|no}` |Use native code from system image if available|
175-
|`--compiled-modules={yes*\|no\|existing|strict}` |Enable or disable incremental precompilation of modules. The `existing` option allows use of existing compiled modules that were previously precompiled, but disallows creation of new precompile files. The `strict` option is similar, but will error if no precompile file is found. |
176-
|`--pkgimages={yes*\|no|existing}` |Enable or disable usage of native code caching in the form of pkgimages. The `existing` option allows use of existing pkgimages but disallows creation of new ones|
175+
|`--compiled-modules={yes*\|no\|existing\|strict}` |Enable or disable incremental precompilation of modules. The `existing` option allows use of existing compiled modules that were previously precompiled, but disallows creation of new precompile files. The `strict` option is similar, but will error if no precompile file is found. |
176+
|`--pkgimages={yes*\|no\|existing}` |Enable or disable usage of native code caching in the form of pkgimages. The `existing` option allows use of existing pkgimages but disallows creation of new ones|
177177
|`-e`, `--eval <expr>` |Evaluate `<expr>`|
178178
|`-E`, `--print <expr>` |Evaluate `<expr>` and display the result|
179+
|`-m`, `--module <Package> [args]` |Run entry point of `Package` (`@main` function) with `args'|
179180
|`-L`, `--load <file>` |Load `<file>` immediately on all processors|
180-
|`-t`, `--threads {N\|auto}` |Enable N threads; `auto` tries to infer a useful default number of threads to use but the exact behavior might change in the future. Currently, `auto` uses the number of CPUs assigned to this julia process based on the OS-specific affinity assignment interface, if supported (Linux and Windows). If this is not supported (macOS) or process affinity is not configured, it uses the number of CPU threads.|
181+
|`-t`, `--threads {auto\|N[,auto\|M]}` |Enable N[+M] threads; N threads are assigned to the `default` threadpool, and if M is specified, M threads are assigned to the `interactive` threadpool; `auto` tries to infer a useful default number of threads to use but the exact behavior might change in the future. Currently sets N to the number of CPUs assigned to this Julia process based on the OS-specific affinity assignment interface if supported (Linux and Windows) or to the number of CPU threads if not supported (MacOS) or if process affinity is not configured, and sets M to 1.|
181182
| `--gcthreads=N[,M]` |Use N threads for the mark phase of GC and M (0 or 1) threads for the concurrent sweeping phase of GC. N is set to half of the number of compute threads and M is set to 0 if unspecified.|
182183
|`-p`, `--procs {N\|auto}` |Integer value N launches N additional local worker processes; `auto` launches as many workers as the number of local CPU threads (logical cores)|
183184
|`--machine-file <file>` |Run processes on hosts listed in `<file>`|
184-
|`-i` |Interactive mode; REPL runs and `isinteractive()` is true|
185+
|`-i`, `--interactive` |Interactive mode; REPL runs and `isinteractive()` is true|
185186
|`-q`, `--quiet` |Quiet startup: no banner, suppress REPL warnings|
186-
|`--banner={yes\|no\|auto*}` |Enable or disable startup banner|
187+
|`--banner={yes\|no\|short\|auto*}` |Enable or disable startup banner|
187188
|`--color={yes\|no\|auto*}` |Enable or disable color text|
188189
|`--history-file={yes*\|no}` |Load or save history|
189190
|`--depwarn={yes\|no*\|error}` |Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)|
190191
|`--warn-overwrite={yes\|no*}` |Enable or disable method overwrite warnings|
191192
|`--warn-scope={yes*\|no}` |Enable or disable warning for ambiguous top-level scope|
192193
|`-C`, `--cpu-target <target>` |Limit usage of CPU features up to `<target>`; set to `help` to see the available options|
193-
|`-O`, `--optimize={0,1,2*,3}` |Set the optimization level (level is 3 if `-O` is used without a level) ($)|
194-
|`--min-optlevel={0*,1,2,3}` |Set the lower bound on per-module optimization|
195-
|`-g`, `--debug-info={0,1*,2}` |Set the level of debug info generation (level is 2 if `-g` is used without a level) ($)|
194+
|`-O`, `--optimize={0\|1\|2*\|3}` |Set the optimization level (level is 3 if `-O` is used without a level) ($)|
195+
|`--min-optlevel={0*\|1\|2\|3}` |Set the lower bound on per-module optimization|
196+
|`-g`, `--debug-info={0\|1*\|2}` |Set the level of debug info generation (level is 2 if `-g` is used without a level) ($)|
196197
|`--inline={yes\|no}` |Control whether inlining is permitted, including overriding `@inline` declarations|
197198
|`--check-bounds={yes\|no\|auto*}` |Emit bounds checks always, never, or respect `@inbounds` declarations ($)|
198199
|`--math-mode={ieee\|user*}` |Always follow `ieee` floating point semantics or respect `@fastmath` declarations|
200+
|`--polly={yes*\|no}` |Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)|
199201
|`--code-coverage[={none*\|user\|all}]` |Count executions of source lines (omitting setting is equivalent to `user`)|
200202
|`--code-coverage=@<path>` |Count executions but only in files that fall under the given file path/directory. The `@` prefix is required to select this option. A `@` with no path will track the current directory.|
201203
|`--code-coverage=tracefile.info` |Append coverage information to the LCOV tracefile (filename supports format tokens).|
202204
|`--track-allocation[={none*\|user\|all}]` |Count bytes allocated by each source line (omitting setting is equivalent to "user")|
203205
|`--track-allocation=@<path>` |Count bytes but only in files that fall under the given file path/directory. The `@` prefix is required to select this option. A `@` with no path will track the current directory.|
204206
|`--bug-report=KIND` |Launch a bug report session. It can be used to start a REPL, run a script, or evaluate expressions. It first tries to use BugReporting.jl installed in current environment and falls back to the latest compatible BugReporting.jl if not. For more information, see `--bug-report=help`.|
207+
|`--heap-size-hint=<size>` |Forces garbage collection if memory usage is higher than the given value. The value may be specified as a number of bytes, optionally in units of KB, MB, GB, or TB, or as a percentage of physical memory with %.|
205208
|`--compile={yes*\|no\|all\|min}` |Enable or disable JIT compiler, or request exhaustive or minimal compilation|
206209
|`--output-o <name>` |Generate an object file (including system image data)|
207210
|`--output-ji <name>` |Generate a system image data file (.ji)|
@@ -211,9 +214,9 @@ The following is a complete list of command-line switches available when launchi
211214
|`--output-bc <name>` |Generate LLVM bitcode (.bc)|
212215
|`--output-asm <name>` |Generate an assembly file (.s)|
213216
|`--output-incremental={yes\|no*}` |Generate an incremental output file (rather than complete)|
214-
|`--trace-compile={stderr,name}` |Print precompile statements for methods compiled during execution or save to a path|
217+
|`--trace-compile={stderr\|name}` |Print precompile statements for methods compiled during execution or save to a path|
215218
|`--image-codegen` |Force generate code in imaging mode|
216-
|`--heap-size-hint=<size>` |Forces garbage collection if memory usage is higher than the given value. The value may be specified as a number of bytes, optionally in units of KB, MB, GB, or TB, or as a percentage of physical memory with %.|
219+
|`--permalloc-pkgimg={yes\|no*}` |Copy the data section of package images into memory|
217220

218221

219222
!!! compat "Julia 1.1"

0 commit comments

Comments
 (0)