Skip to content

Commit c8db013

Browse files
committed
fix(upstream): crate info removed from codegen_crate
1 parent 5b8d20f commit c8db013

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

flake.lock

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

src/driver.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
131131
self.backend.target_cpu(sess)
132132
}
133133

134-
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>, crate_info: &CrateInfo) -> Box<dyn Any> {
135-
let ongoing_codegen = self.backend.codegen_crate(tcx, crate_info);
134+
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Box<dyn Any> {
135+
let ongoing_codegen = self.backend.codegen_crate(tcx);
136136
let outputs = tcx.output_filenames(());
137137

138138
// HACK: ZFS contains a bug that if std::fs::copy overwrites an existing file,
@@ -146,9 +146,11 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
146146
}
147147
}
148148

149-
let (cg, work_map) = self
150-
.backend
151-
.join_codegen(ongoing_codegen, tcx.sess, outputs);
149+
let crate_info = CrateInfo::new(tcx, self.backend.target_cpu(tcx.sess));
150+
151+
let (cg, work_map) =
152+
self.backend
153+
.join_codegen(ongoing_codegen, tcx.sess, outputs, &crate_info);
152154

153155
self.callback.lock().unwrap().after_codegen(cx::<C>(tcx));
154156

@@ -167,6 +169,7 @@ impl<C: CallbacksExt> CodegenBackend for BackendWrapper<C> {
167169
ongoing_codegen: Box<dyn Any>,
168170
_sess: &Session,
169171
_outputs: &OutputFilenames,
172+
_crate_info: &CrateInfo,
170173
) -> (CompiledModules, FxIndexMap<WorkProductId, WorkProduct>) {
171174
*ongoing_codegen.downcast().unwrap()
172175
}

0 commit comments

Comments
 (0)