fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1# ignore-cross-compile 2include ../tools.mk 3 4# FIXME: it would be good to check that it's actually the rightmost flags 5# that are used when multiple flags are specified, but I can't think of a 6# reliable way to check this. 7 8all: 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) -O -O main.rs 12 $(RUSTC) -O -C opt-level=0 main.rs 13 $(RUSTC) -C opt-level=0 -O main.rs 14 $(RUSTC) -C opt-level=0 -C opt-level=2 main.rs 15 $(RUSTC) -C opt-level=2 -C opt-level=0 main.rs 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) -g -g main.rs 20 $(RUSTC) -g -C debuginfo=0 main.rs 21 $(RUSTC) -C debuginfo=0 -g main.rs 22 $(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs 23 $(RUSTC) -C debuginfo=2 -C debuginfo=0 main.rs