Skip to content

Commit 1920708

Browse files
committed
Upgrade Rust toolchain to 2025-06-17
Relevant upstream PR: - rust-lang/rust#141769 (Move metadata object generation for dylibs to the linker code) Resolves: model-checking#4162
1 parent 14a7ec7 commit 1920708

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

kani-compiler/src/codegen_cprover_gotoc/compiler_interface.rs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,7 @@ impl CodegenBackend for GotocCodegenBackend {
283283
}
284284
}
285285

286-
fn codegen_crate(
287-
&self,
288-
tcx: TyCtxt,
289-
rustc_metadata: EncodedMetadata,
290-
_need_metadata_module: bool,
291-
) -> Box<dyn Any> {
286+
fn codegen_crate(&self, tcx: TyCtxt) -> Box<dyn Any> {
292287
let ret_val = rustc_internal::run(tcx, || {
293288
super::utils::init();
294289

@@ -414,7 +409,7 @@ impl CodegenBackend for GotocCodegenBackend {
414409
);
415410
}
416411
}
417-
codegen_results(tcx, rustc_metadata, &results.machine_model)
412+
codegen_results(tcx, &results.machine_model)
418413
});
419414
ret_val.unwrap()
420415
}
@@ -440,12 +435,18 @@ impl CodegenBackend for GotocCodegenBackend {
440435
/// For other crate types, we stub the file requested by writing the
441436
/// path of the `kani-metadata.json` file so `kani-driver` can safely find the latest metadata.
442437
/// See <https://github.com/model-checking/kani/issues/2234> for more details.
443-
fn link(&self, sess: &Session, codegen_results: CodegenResults, outputs: &OutputFilenames) {
438+
fn link(
439+
&self,
440+
sess: &Session,
441+
codegen_results: CodegenResults,
442+
rustc_metadata: EncodedMetadata,
443+
outputs: &OutputFilenames,
444+
) {
444445
let requested_crate_types = &codegen_results.crate_info.crate_types.clone();
445446
let local_crate_name = codegen_results.crate_info.local_crate_name;
446447
// Create the rlib if one was requested.
447448
if requested_crate_types.contains(&CrateType::Rlib) {
448-
link_binary(sess, &ArArchiveBuilderBuilder, codegen_results, outputs);
449+
link_binary(sess, &ArArchiveBuilderBuilder, codegen_results, rustc_metadata, outputs);
449450
}
450451

451452
// But override all the other outputs.
@@ -541,18 +542,12 @@ fn check_options(session: &Session) {
541542
}
542543

543544
/// Return a struct that contains information about the codegen results as expected by `rustc`.
544-
fn codegen_results(
545-
tcx: TyCtxt,
546-
rustc_metadata: EncodedMetadata,
547-
machine: &MachineModel,
548-
) -> Box<dyn Any> {
545+
fn codegen_results(tcx: TyCtxt, machine: &MachineModel) -> Box<dyn Any> {
549546
let work_products = FxIndexMap::<WorkProductId, WorkProduct>::default();
550547
Box::new((
551548
CodegenResults {
552549
modules: vec![],
553550
allocator_module: None,
554-
metadata_module: None,
555-
metadata: rustc_metadata,
556551
crate_info: CrateInfo::new(tcx, machine.architecture.clone()),
557552
},
558553
work_products,

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2025-06-16"
5+
channel = "nightly-2025-06-17"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

0 commit comments

Comments
 (0)