Add a run-make test for command aliases
This commit is contained in:
parent
e8e43c9e16
commit
11b1d483b2
22
src/test/run-make/override-aliased-flags/Makefile
Normal file
22
src/test/run-make/override-aliased-flags/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
# FIXME: it would be good to check that it's actually the rightmost flags
|
||||
# that are used when multiple flags are specified, but I can't think of a
|
||||
# reliable way to check this.
|
||||
|
||||
all:
|
||||
# Test that `-O` and `-C opt-level` can be specified multiple times.
|
||||
# The rightmost flag will be used over any previous flags.
|
||||
$(RUSTC) -O -O main.rs
|
||||
$(RUSTC) -O -C opt-level=0 main.rs
|
||||
$(RUSTC) -C opt-level=0 -O main.rs
|
||||
$(RUSTC) -C opt-level=0 -C opt-level=2 main.rs
|
||||
$(RUSTC) -C opt-level=2 -C opt-level=0 main.rs
|
||||
|
||||
# Test that `-g` and `-C debuginfo` can be specified multiple times.
|
||||
# The rightmost flag will be used over any previous flags.
|
||||
$(RUSTC) -g -g main.rs
|
||||
$(RUSTC) -g -C debuginfo=0 main.rs
|
||||
$(RUSTC) -C debuginfo=0 -g main.rs
|
||||
$(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs
|
||||
$(RUSTC) -C debuginfo=2 -C debuginfo=0 main.rs
|
1
src/test/run-make/override-aliased-flags/main.rs
Normal file
1
src/test/run-make/override-aliased-flags/main.rs
Normal file
@ -0,0 +1 @@
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user