@@ -175,7 +175,6 @@ fn save_as_file(obj: &[u8], path: &Path) -> Result<(), LtoBitcodeFromRlib> {
175175pub ( crate ) fn run_fat (
176176 cgcx : & CodegenContext < GccCodegenBackend > ,
177177 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
178- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
179178) -> Result < ModuleCodegen < GccContext > , FatalError > {
180179 let dcx = cgcx. create_dcx ( ) ;
181180 let dcx = dcx. handle ( ) ;
@@ -186,7 +185,6 @@ pub(crate) fn run_fat(
186185 cgcx,
187186 dcx,
188187 modules,
189- cached_modules,
190188 lto_data. upstream_modules ,
191189 lto_data. tmp_path ,
192190 //<o_data.symbols_below_threshold,
@@ -197,7 +195,6 @@ fn fat_lto(
197195 cgcx : & CodegenContext < GccCodegenBackend > ,
198196 _dcx : DiagCtxtHandle < ' _ > ,
199197 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
200- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
201198 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
202199 tmp_path : TempDir ,
203200 //symbols_below_threshold: &[String],
@@ -211,21 +208,12 @@ fn fat_lto(
211208 // modules that are serialized in-memory.
212209 // * `in_memory` contains modules which are already parsed and in-memory,
213210 // such as from multi-CGU builds.
214- //
215- // All of `cached_modules` (cached from previous incremental builds) can
216- // immediately go onto the `serialized_modules` modules list and then we can
217- // split the `modules` array into these two lists.
218211 let mut in_memory = Vec :: new ( ) ;
219- serialized_modules. extend ( cached_modules. into_iter ( ) . map ( |( buffer, wp) | {
220- info ! ( "pushing cached module {:?}" , wp. cgu_name) ;
221- ( buffer, CString :: new ( wp. cgu_name ) . unwrap ( ) )
222- } ) ) ;
223212 for module in modules {
224213 match module {
225214 FatLtoInput :: InMemory ( m) => in_memory. push ( m) ,
226215 FatLtoInput :: Serialized { name, buffer } => {
227216 info ! ( "pushing serialized module {:?}" , name) ;
228- let buffer = SerializedModule :: Local ( buffer) ;
229217 serialized_modules. push ( ( buffer, CString :: new ( name) . unwrap ( ) ) ) ;
230218 }
231219 }
0 commit comments