@@ -24,7 +24,7 @@ use std::sync::Arc;
24
24
25
25
use gccjit:: { Context , OutputKind } ;
26
26
use object:: read:: archive:: ArchiveFile ;
27
- use rustc_codegen_ssa:: back:: lto:: { LtoModuleCodegen , SerializedModule , ThinModule , ThinShared } ;
27
+ use rustc_codegen_ssa:: back:: lto:: { SerializedModule , ThinModule , ThinShared } ;
28
28
use rustc_codegen_ssa:: back:: symbol_export;
29
29
use rustc_codegen_ssa:: back:: write:: { CodegenContext , FatLtoInput } ;
30
30
use rustc_codegen_ssa:: traits:: * ;
@@ -176,7 +176,7 @@ pub(crate) fn run_fat(
176
176
cgcx : & CodegenContext < GccCodegenBackend > ,
177
177
modules : Vec < FatLtoInput < GccCodegenBackend > > ,
178
178
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
179
- ) -> Result < LtoModuleCodegen < GccCodegenBackend > , FatalError > {
179
+ ) -> Result < ModuleCodegen < GccContext > , FatalError > {
180
180
let dcx = cgcx. create_dcx ( ) ;
181
181
let dcx = dcx. handle ( ) ;
182
182
let lto_data = prepare_lto ( cgcx, dcx) ?;
@@ -201,7 +201,7 @@ fn fat_lto(
201
201
mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
202
202
tmp_path : TempDir ,
203
203
//symbols_below_threshold: &[String],
204
- ) -> Result < LtoModuleCodegen < GccCodegenBackend > , FatalError > {
204
+ ) -> Result < ModuleCodegen < GccContext > , FatalError > {
205
205
let _timer = cgcx. prof . generic_activity ( "GCC_fat_lto_build_monolithic_module" ) ;
206
206
info ! ( "going for a fat lto" ) ;
207
207
@@ -334,7 +334,7 @@ fn fat_lto(
334
334
// of now.
335
335
module. module_llvm . temp_dir = Some ( tmp_path) ;
336
336
337
- Ok ( LtoModuleCodegen :: Fat ( module) )
337
+ Ok ( module)
338
338
}
339
339
340
340
pub struct ModuleBuffer ( PathBuf ) ;
@@ -358,7 +358,7 @@ pub(crate) fn run_thin(
358
358
cgcx : & CodegenContext < GccCodegenBackend > ,
359
359
modules : Vec < ( String , ThinBuffer ) > ,
360
360
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
361
- ) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
361
+ ) -> Result < ( Vec < ThinModule < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
362
362
let dcx = cgcx. create_dcx ( ) ;
363
363
let dcx = dcx. handle ( ) ;
364
364
let lto_data = prepare_lto ( cgcx, dcx) ?;
@@ -427,7 +427,7 @@ fn thin_lto(
427
427
tmp_path : TempDir ,
428
428
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
429
429
//_symbols_below_threshold: &[String],
430
- ) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
430
+ ) -> Result < ( Vec < ThinModule < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
431
431
let _timer = cgcx. prof . generic_activity ( "LLVM_thin_lto_global_analysis" ) ;
432
432
info ! ( "going for that thin, thin LTO" ) ;
433
433
@@ -573,8 +573,7 @@ fn thin_lto(
573
573
}*/
574
574
575
575
info ! ( " - {}: re-compiled" , module_name) ;
576
- opt_jobs
577
- . push ( LtoModuleCodegen :: Thin ( ThinModule { shared : shared. clone ( ) , idx : module_index } ) ) ;
576
+ opt_jobs. push ( ThinModule { shared : shared. clone ( ) , idx : module_index } ) ;
578
577
}
579
578
580
579
// Save the current ThinLTO import information for the next compilation
0 commit comments