Skip to content

Commit e5d3c48

Browse files
committed
Add a run-make test for command aliases
1 parent 226894b commit e5d3c48

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-include ../../run-make-fulldeps/tools.mk
2+
3+
# FIXME: it would be good to check that it's actually the rightmost flags
4+
# that are used when multiple flags are specified, but I can't think of a
5+
# reliable way to check this.
6+
7+
all:
8+
# Test that `-O` and `-C opt-level` can be specified multiple times.
9+
# The rightmost flag will be used over any previous flags.
10+
$(RUSTC) -O -O main.rs
11+
$(RUSTC) -O -C opt-level=0 main.rs
12+
$(RUSTC) -C opt-level=0 -O main.rs
13+
$(RUSTC) -C opt-level=0 -C opt-level=2 main.rs
14+
$(RUSTC) -C opt-level=2 -C opt-level=0 main.rs
15+
16+
# Test that `-g` and `-C debuginfo` can be specified multiple times.
17+
# The rightmost flag will be used over any previous flags.
18+
$(RUSTC) -g -g main.rs
19+
$(RUSTC) -g -C debuginfo=0 main.rs
20+
$(RUSTC) -C debuginfo=0 -g main.rs
21+
$(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs
22+
$(RUSTC) -C debuginfo=2 -C debuginfo=0 main.rs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fn main() {}

0 commit comments

Comments
 (0)