@@ -26,15 +26,15 @@ use object::read::archive::ArchiveFile;
2626use rustc_codegen_ssa:: back:: lto:: SerializedModule ;
2727use rustc_codegen_ssa:: back:: write:: { CodegenContext , FatLtoInput , SharedEmitter } ;
2828use rustc_codegen_ssa:: traits:: * ;
29- use rustc_codegen_ssa:: { ModuleCodegen , ModuleKind , looks_like_rust_object_file} ;
29+ use rustc_codegen_ssa:: { CompiledModule , ModuleCodegen , ModuleKind , looks_like_rust_object_file} ;
3030use rustc_data_structures:: memmap:: Mmap ;
3131use rustc_data_structures:: profiling:: SelfProfilerRef ;
3232use rustc_errors:: { DiagCtxt , DiagCtxtHandle } ;
3333use rustc_log:: tracing:: info;
3434use rustc_session:: config:: Lto ;
3535use tempfile:: { TempDir , tempdir} ;
3636
37- use crate :: back:: write:: save_temp_bitcode;
37+ use crate :: back:: write:: { codegen , save_temp_bitcode} ;
3838use crate :: errors:: LtoBitcodeFromRlib ;
3939use crate :: { GccCodegenBackend , GccContext , LtoMode , to_gcc_opt_level} ;
4040
@@ -112,7 +112,7 @@ pub(crate) fn run_fat(
112112 shared_emitter : & SharedEmitter ,
113113 each_linked_rlib_for_lto : & [ PathBuf ] ,
114114 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
115- ) -> ModuleCodegen < GccContext > {
115+ ) -> CompiledModule {
116116 let dcx = DiagCtxt :: new ( Box :: new ( shared_emitter. clone ( ) ) ) ;
117117 let dcx = dcx. handle ( ) ;
118118 let lto_data = prepare_lto ( cgcx, each_linked_rlib_for_lto, dcx) ;
@@ -132,12 +132,12 @@ pub(crate) fn run_fat(
132132fn fat_lto (
133133 cgcx : & CodegenContext ,
134134 prof : & SelfProfilerRef ,
135- _dcx : DiagCtxtHandle < ' _ > ,
135+ dcx : DiagCtxtHandle < ' _ > ,
136136 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
137137 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
138138 tmp_path : TempDir ,
139139 //symbols_below_threshold: &[String],
140- ) -> ModuleCodegen < GccContext > {
140+ ) -> CompiledModule {
141141 let _timer = prof. generic_activity ( "GCC_fat_lto_build_monolithic_module" ) ;
142142 info ! ( "going for a fat lto" ) ;
143143
@@ -260,7 +260,7 @@ fn fat_lto(
260260 // of now.
261261 module. module_llvm . temp_dir = Some ( tmp_path) ;
262262
263- module
263+ codegen ( cgcx , prof , dcx , module, & cgcx . module_config )
264264}
265265
266266pub struct ModuleBuffer ( PathBuf ) ;
0 commit comments