Skip to content

Commit 2cfff08

Browse files
Rollup merge of #156243 - bjorn3:lto_refactors18, r=mu001999
Move CrateInfo computation after codegen_crate CrateInfo is only necessary during linking and non-local LTO. Part of rust-lang/compiler-team#908
2 parents 496b2b1 + d2a379f commit 2cfff08

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,21 @@ impl CodegenBackend for GccCodegenBackend {
291291
target_cpu(sess).to_owned()
292292
}
293293

294-
fn codegen_crate(&self, tcx: TyCtxt<'_>, crate_info: &CrateInfo) -> Box<dyn Any> {
295-
Box::new(codegen_crate(self.clone(), tcx, crate_info))
294+
fn codegen_crate(&self, tcx: TyCtxt<'_>) -> Box<dyn Any> {
295+
Box::new(codegen_crate(self.clone(), tcx))
296296
}
297297

298298
fn join_codegen(
299299
&self,
300300
ongoing_codegen: Box<dyn Any>,
301301
sess: &Session,
302302
_outputs: &OutputFilenames,
303+
crate_info: &CrateInfo,
303304
) -> (CompiledModules, FxIndexMap<WorkProductId, WorkProduct>) {
304305
ongoing_codegen
305306
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
306307
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")
307-
.join(sess)
308+
.join(sess, crate_info)
308309
}
309310

310311
fn target_config(&self, sess: &Session) -> TargetConfig {

0 commit comments

Comments
 (0)