fork/rust

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

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

1.41.0
494 B12 linesraw
1-include ../tools.mk
2
3# Check that cross-crate inlined items are inlined in all compilation units
4# that refer to them, and not in any other compilation units.
5# Note that we have to pass `-C codegen-units=6` because up to two CGUs may be
6# created for each source module (see `rustc_mir::monomorphize::partitioning`).
7
8all:
9	$(RUSTC) cci_lib.rs
10	$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=6 \
11		-Z inline-in-all-cgus
12	[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ .*cci_fn)" -eq "2" ]