@@ -181,7 +181,14 @@ impl<'tcx, B: Backend + 'static> CodegenCx<'tcx, B> {
181181 }
182182}
183183
184- struct CraneliftCodegenBackend ;
184+ #[ derive( Copy , Clone , Debug ) ]
185+ pub struct BackendConfig {
186+ pub use_jit : bool ,
187+ }
188+
189+ pub struct CraneliftCodegenBackend {
190+ pub config : BackendConfig ,
191+ }
185192
186193impl CodegenBackend for CraneliftCodegenBackend {
187194 fn init ( & self , sess : & Session ) {
@@ -223,7 +230,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
223230 metadata : EncodedMetadata ,
224231 need_metadata_module : bool ,
225232 ) -> Box < dyn Any > {
226- let res = driver:: codegen_crate ( tcx, metadata, need_metadata_module) ;
233+ let res = driver:: codegen_crate ( tcx, metadata, need_metadata_module, self . config ) ;
227234
228235 rustc_symbol_mangling:: test:: report_symbol_names ( tcx) ;
229236
@@ -345,5 +352,9 @@ fn build_isa(sess: &Session, enable_pic: bool) -> Box<dyn isa::TargetIsa + 'stat
345352/// This is the entrypoint for a hot plugged rustc_codegen_cranelift
346353#[ no_mangle]
347354pub fn __rustc_codegen_backend ( ) -> Box < dyn CodegenBackend > {
348- Box :: new ( CraneliftCodegenBackend )
355+ Box :: new ( CraneliftCodegenBackend {
356+ config : BackendConfig {
357+ use_jit : false ,
358+ }
359+ } )
349360}
0 commit comments