fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
851 B22 linesraw
1-include ../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
7all:
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