File tree Expand file tree Collapse file tree 3 files changed +24
-24
lines changed
tests/run-make/override-aliased-flags Expand file tree Collapse file tree 3 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ run-make/obey-crate-type-flag/Makefile
114114run-make/optimization-remarks-dir-pgo/Makefile
115115run-make/optimization-remarks-dir/Makefile
116116run-make/output-type-permutations/Makefile
117- run-make/override-aliased-flags/Makefile
118117run-make/panic-abort-eh_frame/Makefile
119118run-make/pass-linker-flags-flavor/Makefile
120119run-make/pass-linker-flags-from-dep/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ //@ ignore-cross-compile
2+
3+ use run_make_support:: rustc;
4+
5+ // FIXME: it would be good to check that it's actually the rightmost flags
6+ // that are used when multiple flags are specified, but I can't think of a
7+ // reliable way to check this.
8+ fn main ( ) {
9+ // Test that `-O` and `-C opt-level` can be specified multiple times.
10+ // The rightmost flag will be used over any previous flags.
11+ rustc ( ) . arg ( "-O" ) . arg ( "-O" ) . input ( "main.rs" ) . run ( ) ;
12+ rustc ( ) . arg ( "-O" ) . arg ( "-C" ) . arg ( "opt-level=0" ) . input ( "main.rs" ) . run ( ) ;
13+ rustc ( ) . arg ( "-C" ) . arg ( "opt-level=0" ) . arg ( "-O" ) . input ( "main.rs" ) . run ( ) ;
14+ rustc ( ) . arg ( "-C" ) . arg ( "opt-level=0" ) . arg ( "-C" ) . arg ( "opt-level=2" ) . input ( "main.rs" ) . run ( ) ;
15+ rustc ( ) . arg ( "-C" ) . arg ( "opt-level=2" ) . arg ( "-C" ) . arg ( "opt-level=0" ) . input ( "main.rs" ) . run ( ) ;
16+
17+ // Test that `-g` and `-C debuginfo` can be specified multiple times.
18+ // The rightmost flag will be used over any previous flags.
19+ rustc ( ) . arg ( "-g" ) . arg ( "-g" ) . input ( "main.rs" ) . run ( ) ;
20+ rustc ( ) . arg ( "-g" ) . arg ( "-C" ) . arg ( "debuginfo=0" ) . input ( "main.rs" ) . run ( ) ;
21+ rustc ( ) . arg ( "-C" ) . arg ( "debuginfo=0" ) . arg ( "-g" ) . input ( "main.rs" ) . run ( ) ;
22+ rustc ( ) . arg ( "-C" ) . arg ( "debuginfo=0" ) . arg ( "-C" ) . arg ( "debuginfo=2" ) . input ( "main.rs" ) . run ( ) ;
23+ rustc ( ) . arg ( "-C" ) . arg ( "debuginfo=2" ) . arg ( "-C" ) . arg ( "debuginfo=0" ) . input ( "main.rs" ) . run ( ) ;
24+ }
You can’t perform that action at this time.
0 commit comments