Skip to content

Commit d106a33

Browse files
committed
rustc: Change --OptLevel to --opt-level
1 parent 8d9c95f commit d106a33

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ Run all passes except translation. Produces no output.
6969
\fB-g\fR:
7070
Produce debug info.
7171
.TP
72-
\fB--OptLevel\fR=\fIlevel\fR:
72+
\fB--opt-level\fR=\fIlevel\fR:
7373
Set optimization level to \fIlevel\fR.
7474
.TP
7575
\fB-O\fR:
76-
Equal to --OptLevel=2
76+
Equal to --opt-level=2
7777
.TP
7878
\fB-S\fR:
7979
Compile to assembly, but do not assemble or link.

src/comp/driver/rustc.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ options:
250250
--parse-only parse only; do not compile, assemble, or link
251251
--no-trans run all passes except translation; no output
252252
-g produce debug info
253-
--OptLevel= optimize with possible levels 0-3
254-
-O equivalent to --OptLevel=2
253+
--opt-level= optimize with possible levels 0-3
254+
-O equivalent to --opt-level=2
255255
-S compile only; do not assemble or link
256256
-c compile and assemble, but do not link
257257
--emit-llvm produce an LLVM bitcode file
@@ -347,12 +347,12 @@ fn build_session_options(match: getopts::match)
347347
let target_opt = getopts::opt_maybe_str(match, "target");
348348
let opt_level: uint =
349349
if opt_present(match, "O") {
350-
if opt_present(match, "OptLevel") {
351-
early_error("-O and --OptLevel both provided");
350+
if opt_present(match, "opt-level") {
351+
early_error("-O and --opt-level both provided");
352352
}
353353
2u
354-
} else if opt_present(match, "OptLevel") {
355-
alt getopts::opt_str(match, "OptLevel") {
354+
} else if opt_present(match, "opt-level") {
355+
alt getopts::opt_str(match, "opt-level") {
356356
"0" { 0u }
357357
"1" { 1u }
358358
"2" { 2u }
@@ -426,7 +426,7 @@ fn opts() -> [getopts::opt] {
426426
ret [optflag("h"), optflag("help"), optflag("v"), optflag("version"),
427427
optflag("emit-llvm"), optflagopt("pretty"),
428428
optflag("ls"), optflag("parse-only"), optflag("no-trans"),
429-
optflag("O"), optopt("OptLevel"), optmulti("L"), optflag("S"),
429+
optflag("O"), optopt("opt-level"), optmulti("L"), optflag("S"),
430430
optflag("c"), optopt("o"), optflag("g"), optflag("save-temps"),
431431
optopt("sysroot"), optopt("target"), optflag("stats"),
432432
optflag("time-passes"), optflag("time-llvm-passes"),

0 commit comments

Comments
 (0)