Skip to content

Commit ceefc85

Browse files
committed
experiment: run mono-item collection in check build
1 parent a385e56 commit ceefc85

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_codegen_ssa/src

1 file changed

+4
-4
lines changed

compiler/rustc_codegen_ssa/src/base.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,10 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
573573
metadata: EncodedMetadata,
574574
need_metadata_module: bool,
575575
) -> OngoingCodegen<B> {
576+
// Run the monomorphization collector and partition the collected items into
577+
// codegen units.
578+
let codegen_units = tcx.collect_and_partition_mono_items(()).1;
579+
576580
// Skip crate items and just output metadata in -Z no-codegen mode.
577581
if tcx.sess.opts.unstable_opts.no_codegen || !tcx.sess.opts.output_types.should_codegen() {
578582
let ongoing_codegen = start_async_codegen(backend, tcx, target_cpu, metadata, None);
@@ -586,10 +590,6 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
586590

587591
let cgu_name_builder = &mut CodegenUnitNameBuilder::new(tcx);
588592

589-
// Run the monomorphization collector and partition the collected items into
590-
// codegen units.
591-
let codegen_units = tcx.collect_and_partition_mono_items(()).1;
592-
593593
// Force all codegen_unit queries so they are already either red or green
594594
// when compile_codegen_unit accesses them. We are not able to re-execute
595595
// the codegen_unit query from just the DepNode, so an unknown color would

0 commit comments

Comments
 (0)