Skip to content

Commit f992a3d

Browse files
committed
Pass Session to optimize_and_codegen_fat_lto
This is necessary to fix incremental LTO in cg_gcc as well as to do some LTO refactorings I want to do. The actual fix for cg_gcc will be done on the cg_gcc repo to test it in CI.
1 parent efbbd33 commit f992a3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,16 +430,16 @@ impl WriteBackendMethods for GccCodegenBackend {
430430
}
431431

432432
fn optimize_and_codegen_fat_lto(
433+
sess: &Session,
433434
cgcx: &CodegenContext,
434-
prof: &SelfProfilerRef,
435435
shared_emitter: &SharedEmitter,
436436
_tm_factory: TargetMachineFactoryFn<Self>,
437437
// FIXME(bjorn3): Limit LTO exports to these symbols
438438
_exported_symbols_for_lto: &[String],
439439
each_linked_rlib_for_lto: &[PathBuf],
440440
modules: Vec<FatLtoInput<Self>>,
441441
) -> CompiledModule {
442-
back::lto::run_fat(cgcx, prof, shared_emitter, each_linked_rlib_for_lto, modules)
442+
back::lto::run_fat(cgcx, &sess.prof, shared_emitter, each_linked_rlib_for_lto, modules)
443443
}
444444

445445
fn run_thin_lto(

0 commit comments

Comments
 (0)