fork/rust

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

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

1.44.0
491 B20 linesraw
1-include ../tools.mk
2
3# only-linux
4# only-x86_64
5#
6# I *really* don't want to deal with a cross-platform way to compare file sizes,
7# tests in `make` sort of are awful
8
9all: $(TMPDIR)/out.log
10	# Make sure no warnings about "unknown CPU `native`" were emitted
11	if [ "$$(wc -c $(TMPDIR)/out.log | cut -d' ' -f 1)" = "0" ]; then \
12	  echo no warnings generated; \
13	else \
14	  exit 1; \
15	fi
16
17
18$(TMPDIR)/out.log:
19	$(RUSTC) foo.rs -C target-cpu=native 2>&1 | tee $(TMPDIR)/out.log
20	$(call RUN,foo)