Skip to content

Commit 819bf71

Browse files
committed
Don't merge CGUs in incremental builds.
1 parent dc25fbe commit 819bf71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,11 @@ where
161161

162162
debug_dump(tcx, "INITIAL PARTITIONING", &codegen_units);
163163

164+
// njn: update comment
164165
// Merge until we have at most `max_cgu_count` codegen units.
165166
// `merge_codegen_units` is responsible for updating the CGU size
166167
// estimates.
167-
{
168+
if cx.tcx.sess.opts.incremental.is_none() {
168169
let _prof_timer = tcx.prof.generic_activity("cgu_partitioning_merge_cgus");
169170
merge_codegen_units(cx, &mut codegen_units);
170171
debug_dump(tcx, "POST MERGING", &codegen_units);

0 commit comments

Comments
 (0)