Skip to content

Commit c1fb4e5

Browse files
Rollup merge of #127041 - GuillaumeGomez:run-make-override-aliased-flags, r=Kobzol
Migrate `run-make/override-aliased-flags` to `rmake.rs` Part of #121876. I voluntarily didn't use the helper methods to make it obvious what's tested. r? `@jieyouxu`
2 parents c70a2e3 + 4ee077a commit c1fb4e5

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

Diff for: src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ run-make/obey-crate-type-flag/Makefile
111111
run-make/optimization-remarks-dir-pgo/Makefile
112112
run-make/optimization-remarks-dir/Makefile
113113
run-make/output-type-permutations/Makefile
114-
run-make/override-aliased-flags/Makefile
115114
run-make/panic-abort-eh_frame/Makefile
116115
run-make/pass-linker-flags-flavor/Makefile
117116
run-make/pass-linker-flags-from-dep/Makefile

Diff for: tests/run-make/override-aliased-flags/Makefile

-23
This file was deleted.

Diff for: tests/run-make/override-aliased-flags/rmake.rs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

0 commit comments

Comments
 (0)