@@ -4,7 +4,7 @@ use std::any::Any;
44use std:: sync:: { Arc , LazyLock , Mutex } ;
55
66use rustc_codegen_ssa:: traits:: CodegenBackend ;
7- use rustc_codegen_ssa:: { CodegenResults , TargetConfig } ;
7+ use rustc_codegen_ssa:: { CompiledModules , CrateInfo , TargetConfig } ;
88use rustc_data_structures:: fx:: { FxHashMap , FxIndexMap } ;
99use rustc_data_structures:: sync:: { DynSend , DynSync } ;
1010use 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