@@ -202,12 +202,7 @@ impl CodegenBackend for LlbcCodegenBackend {
202202 DEFAULT_LOCALE_RESOURCE
203203 }
204204
205- fn codegen_crate (
206- & self ,
207- tcx : TyCtxt ,
208- rustc_metadata : EncodedMetadata ,
209- _need_metadata_module : bool ,
210- ) -> Box < dyn Any > {
205+ fn codegen_crate ( & self , tcx : TyCtxt ) -> Box < dyn Any > {
211206 let ret_val = rustc_internal:: run ( tcx, || {
212207 // Queries shouldn't change today once codegen starts.
213208 let queries = self . queries . lock ( ) . unwrap ( ) . clone ( ) ;
@@ -286,7 +281,7 @@ impl CodegenBackend for LlbcCodegenBackend {
286281 // To avoid overriding the metadata for its verification, we skip this step when
287282 // reachability is None, even because there is nothing to record.
288283 }
289- codegen_results ( tcx, rustc_metadata )
284+ codegen_results ( tcx)
290285 } ) ;
291286 ret_val. unwrap ( )
292287 }
@@ -318,10 +313,16 @@ impl CodegenBackend for LlbcCodegenBackend {
318313 /// For cases where no metadata file was requested, we stub the file requested by writing the
319314 /// path of the `kani-metadata.json` file so `kani-driver` can safely find the latest metadata.
320315 /// See <https://github.com/model-checking/kani/issues/2234> for more details.
321- fn link ( & self , sess : & Session , codegen_results : CodegenResults , outputs : & OutputFilenames ) {
316+ fn link (
317+ & self ,
318+ sess : & Session ,
319+ codegen_results : CodegenResults ,
320+ rustc_metadata : EncodedMetadata ,
321+ outputs : & OutputFilenames ,
322+ ) {
322323 let requested_crate_types = & codegen_results. crate_info . crate_types . clone ( ) ;
323324 let local_crate_name = codegen_results. crate_info . local_crate_name ;
324- link_binary ( sess, & ArArchiveBuilderBuilder , codegen_results, outputs) ;
325+ link_binary ( sess, & ArArchiveBuilderBuilder , codegen_results, rustc_metadata , outputs) ;
325326 for crate_type in requested_crate_types {
326327 let out_fname = out_filename ( sess, * crate_type, outputs, local_crate_name) ;
327328 let out_path = out_fname. as_path ( ) ;
@@ -356,14 +357,12 @@ fn contract_metadata_for_harness(
356357}
357358
358359/// Return a struct that contains information about the codegen results as expected by `rustc`.
359- fn codegen_results ( tcx : TyCtxt , rustc_metadata : EncodedMetadata ) -> Box < dyn Any > {
360+ fn codegen_results ( tcx : TyCtxt ) -> Box < dyn Any > {
360361 let work_products = FxIndexMap :: < WorkProductId , WorkProduct > :: default ( ) ;
361362 Box :: new ( (
362363 CodegenResults {
363364 modules : vec ! [ ] ,
364365 allocator_module : None ,
365- metadata_module : None ,
366- metadata : rustc_metadata,
367366 crate_info : CrateInfo :: new ( tcx, tcx. sess . target . arch . clone ( ) . to_string ( ) ) ,
368367 } ,
369368 work_products,
0 commit comments