@@ -175,7 +175,6 @@ fn save_as_file(obj: &[u8], path: &Path) -> Result<(), LtoBitcodeFromRlib> {
175
175
pub ( crate ) fn run_fat (
176
176
cgcx : & CodegenContext < GccCodegenBackend > ,
177
177
modules : Vec < FatLtoInput < GccCodegenBackend > > ,
178
- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
179
178
) -> Result < ModuleCodegen < GccContext > , FatalError > {
180
179
let dcx = cgcx. create_dcx ( ) ;
181
180
let dcx = dcx. handle ( ) ;
@@ -186,7 +185,6 @@ pub(crate) fn run_fat(
186
185
cgcx,
187
186
dcx,
188
187
modules,
189
- cached_modules,
190
188
lto_data. upstream_modules ,
191
189
lto_data. tmp_path ,
192
190
//<o_data.symbols_below_threshold,
@@ -197,7 +195,6 @@ fn fat_lto(
197
195
cgcx : & CodegenContext < GccCodegenBackend > ,
198
196
_dcx : DiagCtxtHandle < ' _ > ,
199
197
modules : Vec < FatLtoInput < GccCodegenBackend > > ,
200
- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
201
198
mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
202
199
tmp_path : TempDir ,
203
200
//symbols_below_threshold: &[String],
@@ -211,21 +208,12 @@ fn fat_lto(
211
208
// modules that are serialized in-memory.
212
209
// * `in_memory` contains modules which are already parsed and in-memory,
213
210
// 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.
218
211
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
- } ) ) ;
223
212
for module in modules {
224
213
match module {
225
214
FatLtoInput :: InMemory ( m) => in_memory. push ( m) ,
226
215
FatLtoInput :: Serialized { name, buffer } => {
227
216
info ! ( "pushing serialized module {:?}" , name) ;
228
- let buffer = SerializedModule :: Local ( buffer) ;
229
217
serialized_modules. push ( ( buffer, CString :: new ( name) . unwrap ( ) ) ) ;
230
218
}
231
219
}
0 commit comments