Skip to content

Commit 9c30f12

Browse files
committed
Auto merge of #31378 - nagisa:target-man, r=alexcrichton
2 parents f511b21 + c5c756b commit 9c30f12

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

man/rustc.1

+26-15
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ Comma separated list of types of crates for the compiler to emit.
5353
Specify the name of the crate being built.
5454
.TP
5555
\fB\-\-emit\fR [asm|llvm\-bc|llvm\-ir|obj|link|dep\-info][=\fIPATH\fR]
56-
Configure the output that \fBrustc\fR will produce.
57-
58-
Each emission may also have an optional explicit output \fIPATH\fR specified for that particular
59-
emission kind. This path takes precedence over the \fB-o\fR option.
56+
Configure the output that \fBrustc\fR will produce. Each emission may also have
57+
an optional explicit output \fIPATH\fR specified for that particular emission
58+
kind. This path takes precedence over the \fB-o\fR option.
6059
.TP
6160
\fB\-\-print\fR [crate\-name|file\-names|sysroot]
6261
Comma separated list of compiler information to print on stdout.
@@ -68,13 +67,11 @@ Equivalent to \fI\-C\ debuginfo=2\fR.
6867
Equivalent to \fI\-C\ opt\-level=2\fR.
6968
.TP
7069
\fB\-o\fR \fIFILENAME\fR
71-
Write output to \fIFILENAME\fR.
72-
Ignored if multiple \fI\-\-emit\fR outputs are specified which don't have an
73-
explicit path otherwise.
70+
Write output to \fIFILENAME\fR. Ignored if multiple \fI\-\-emit\fR outputs are specified which
71+
don't have an explicit path otherwise.
7472
.TP
7573
\fB\-\-out\-dir\fR \fIDIR\fR
76-
Write output to compiler\[hy]chosen filename in \fIDIR\fR.
77-
Ignored if \fI\-o\fR is specified.
74+
Write output to compiler\[hy]chosen filename in \fIDIR\fR. Ignored if \fI\-o\fR is specified.
7875
Defaults to the current directory.
7976
.TP
8077
\fB\-\-explain\fR \fIOPT\fR
@@ -83,12 +80,26 @@ Provide a detailed explanation of an error message.
8380
\fB\-\-test\fR
8481
Build a test harness.
8582
.TP
86-
\fB\-\-target\fR \fITRIPLE\fR
87-
Target triple \fIcpu\fR\-\fImanufacturer\fR\-\fIkernel\fR[\-\fIos\fR]
88-
to compile for (see chapter 3.4 of
89-
.UR http://www.sourceware.org/autobook/
90-
.UE
91-
for details).
83+
\fB\-\-target\fR \fITARGET\fR
84+
Target triple for which the code is compiled. This option defaults to the host’s target
85+
triple. The target triple has the general format <arch><sub>\-<vendor>\-<sys>\-<abi>, where:
86+
.RS
87+
.TP
88+
.B <arch>
89+
x86, arm, thumb, mips, etc.
90+
.TP
91+
.B <sub>
92+
for example on ARM: v5, v6m, v7a, v7m, etc.
93+
.TP
94+
.B <vendor>
95+
pc, apple, nvidia, ibm, etc.
96+
.TP
97+
.B <sys>
98+
none, linux, win32, darwin, cuda, etc.
99+
.TP
100+
.B <abi>
101+
eabi, gnu, android, macho, elf, etc.
102+
.RE
92103
.TP
93104
\fB\-W help\fR
94105
Print 'lint' options and default settings.

src/librustc/session/config.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
845845
opt::opt("", "explain", "Provide a detailed explanation of an error \
846846
message", "OPT"),
847847
opt::flag("", "test", "Build a test harness"),
848-
opt::opt("", "target", "Target triple cpu-manufacturer-kernel[-os] \
849-
to compile for (see chapter 3.4 of \
850-
http://www.sourceware.org/autobook/
851-
for details)",
852-
"TRIPLE"),
848+
opt::opt("", "target", "Target triple for which the code is compiled", "TARGET"),
853849
opt::multi("W", "warn", "Set lint warnings", "OPT"),
854850
opt::multi("A", "allow", "Set lint allowed", "OPT"),
855851
opt::multi("D", "deny", "Set lint denied", "OPT"),

0 commit comments

Comments
 (0)