Skip to content

Commit 5424dc4

Browse files
committed
write headings for command line arguments
1 parent 4f6ed51 commit 5424dc4

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The Rustc Book
22

33
- [What is rustc?](what-is-rustc.md)
4-
- [Command-line arguments](command-line-arguments/index.md)
4+
- [Command-line arguments](command-line-arguments.md)
55
- [Lints](lints/index.md)
66
- [Lint levels](lints/levels.md)
77
- [Lint Groups](lints/groups.md)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Command-line arguments
2+
3+
Here's a list of command-line arguments to `rustc` and what they do.
4+
5+
## `-h`/`--help`: get help
6+
7+
## `--cfg`: configure the compilation environment
8+
9+
## `-L`: add a directory to the library search path.
10+
11+
## `-l`: link the generated crate to a native library
12+
13+
## `--crate-type`: a list of types of crates for the compiler to emit
14+
15+
## `--crate-name`: specify the name of the crate being built
16+
17+
## `--emit`: emit output other than a crate
18+
19+
## `--print`: print compiler information
20+
21+
## `-g`: include debug information
22+
23+
## `-O`: optimize your code
24+
25+
## `-o`: filename of the output
26+
27+
## `--out-dir`: directory to write the output in
28+
29+
## `--explain`: provide a detailed explanation of an error message
30+
31+
## `--test`: build a test harness
32+
33+
## `--target`: select a target triple to build
34+
35+
## `-W`: set lint warnings
36+
37+
## `-A`: set lint allowed
38+
39+
## `-D`: set lint denied
40+
41+
## `-F`: set lint forbidden
42+
43+
## `--cap-lints`: set the most restrictive lint level
44+
45+
## `-C`/`--codegen`: code generation options
46+
47+
## `-V`/`--verision`: print a version
48+
49+
## `-v`/`--verbose`: use verbose output
50+
51+
## `--extern`: specify where an external library is located
52+
53+
## `--sysroot`: Override the system root
54+
55+
## `--error-format`: control how errors are produced
56+
57+
## `--color`: configur coloring of output

src/doc/rustc/src/command-line-arguments/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)