Skip to content

Commit 8a09787

Browse files
committed
test: use the right amount of CGUs in sepcomp-cci-copies to ensure deterministic splitting.
1 parent dff3156 commit 8a09787

File tree

1 file changed

+3
-1
lines changed
  • src/test/run-make/sepcomp-cci-copies

1 file changed

+3
-1
lines changed

src/test/run-make/sepcomp-cci-copies/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
# Check that cross-crate inlined items are inlined in all compilation units
44
# 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`).
57

68
all:
79
$(RUSTC) cci_lib.rs
8-
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3 \
10+
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=6 \
911
-Z inline-in-all-cgus
1012
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ .*cci_fn)" -eq "2" ]

0 commit comments

Comments
 (0)