fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
357 B9 linesraw
1-include ../tools.mk
2
3# Test that separate compilation actually puts code into separate compilation
4# units.  `foo.rs` defines `magic_fn` in three different modules, which should
5# wind up in three different compilation units.
6
7all:
8	$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3
9	[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ .*magic_fn)" -eq "3" ]