Skip to content

Commit 0e6b813

Browse files
committed
Update to support 2026-03-03 nightly
1 parent 9259323 commit 0e6b813

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/driver.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::any::Any;
44
use std::sync::{Arc, LazyLock, Mutex};
55

66
use rustc_codegen_ssa::traits::CodegenBackend;
7-
use rustc_codegen_ssa::{CodegenResults, TargetConfig};
7+
use rustc_codegen_ssa::{CompiledModules, CrateInfo, TargetConfig};
88
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
99
use rustc_data_structures::sync::{DynSend, DynSync};
1010
use rustc_driver::{Callbacks, Compilation};
@@ -115,8 +115,12 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
115115
self.backend.name()
116116
}
117117

118-
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Box<dyn Any> {
119-
let ongoing_codegen = self.backend.codegen_crate(tcx);
118+
fn target_cpu(&self, sess: &Session) -> String {
119+
self.backend.target_cpu(sess)
120+
}
121+
122+
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>, crate_info: &CrateInfo) -> Box<dyn Any> {
123+
let ongoing_codegen = self.backend.codegen_crate(tcx, crate_info);
120124
let outputs = tcx.output_filenames(());
121125
let (cg, work_map) = self
122126
.backend
@@ -139,7 +143,7 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
139143
ongoing_codegen: Box<dyn Any>,
140144
_sess: &Session,
141145
_outputs: &OutputFilenames,
142-
) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>) {
146+
) -> (CompiledModules, FxIndexMap<WorkProductId, WorkProduct>) {
143147
*ongoing_codegen.downcast().unwrap()
144148
}
145149

@@ -174,11 +178,13 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
174178
fn link(
175179
&self,
176180
sess: &Session,
177-
codegen_results: CodegenResults,
181+
compiled_modules: CompiledModules,
182+
crate_info: CrateInfo,
178183
metadata: EncodedMetadata,
179184
outputs: &OutputFilenames,
180185
) {
181-
self.backend.link(sess, codegen_results, metadata, outputs)
186+
self.backend
187+
.link(sess, compiled_modules, crate_info, metadata, outputs)
182188
}
183189
}
184190

0 commit comments

Comments
 (0)