@@ -250,8 +250,8 @@ options:
250
250
--parse-only parse only; do not compile, assemble, or link
251
251
--no-trans run all passes except translation; no output
252
252
-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
255
255
-S compile only; do not assemble or link
256
256
-c compile and assemble, but do not link
257
257
--emit-llvm produce an LLVM bitcode file
@@ -347,12 +347,12 @@ fn build_session_options(match: getopts::match)
347
347
let target_opt = getopts:: opt_maybe_str ( match , "target" ) ;
348
348
let opt_level: uint =
349
349
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" ) ;
352
352
}
353
353
2 u
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 " ) {
356
356
"0" { 0 u }
357
357
"1" { 1 u }
358
358
"2" { 2 u }
@@ -426,7 +426,7 @@ fn opts() -> [getopts::opt] {
426
426
ret [ optflag ( "h" ) , optflag ( "help" ) , optflag ( "v" ) , optflag ( "version" ) ,
427
427
optflag ( "emit-llvm" ) , optflagopt ( "pretty" ) ,
428
428
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" ) ,
430
430
optflag ( "c" ) , optopt ( "o" ) , optflag ( "g" ) , optflag ( "save-temps" ) ,
431
431
optopt ( "sysroot" ) , optopt ( "target" ) , optflag ( "stats" ) ,
432
432
optflag ( "time-passes" ) , optflag ( "time-llvm-passes" ) ,
0 commit comments