fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.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" ]