Skip to content

Commit

Permalink
test: use the right amount of CGUs in sepcomp-cci-copies to ensure de…
Browse files Browse the repository at this point in the history
…terministic splitting.
  • Loading branch information
eddyb committed Feb 13, 2018
1 parent dff3156 commit 8a09787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/run-make/sepcomp-cci-copies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

# Check that cross-crate inlined items are inlined in all compilation units
# that refer to them, and not in any other compilation units.
# Note that we have to pass `-C codegen-units=6` because up to two CGUs may be
# created for each source module (see `rustc_mir::monomorphize::partitioning`).

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

0 comments on commit 8a09787

Please sign in to comment.