@@ -11,6 +11,7 @@ use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
11
11
use rustc_codegen_ssa:: CrateInfo ;
12
12
use rustc_middle:: mir:: mono:: MonoItem ;
13
13
use rustc_session:: Session ;
14
+ use rustc_span:: Symbol ;
14
15
15
16
use cranelift_jit:: { JITBuilder , JITModule } ;
16
17
@@ -75,7 +76,13 @@ fn create_jit_module<'tcx>(
75
76
jit_builder. symbols ( imported_symbols) ;
76
77
let mut jit_module = JITModule :: new ( jit_builder) ;
77
78
78
- let mut cx = crate :: CodegenCx :: new ( tcx, backend_config. clone ( ) , jit_module. isa ( ) , false ) ;
79
+ let mut cx = crate :: CodegenCx :: new (
80
+ tcx,
81
+ backend_config. clone ( ) ,
82
+ jit_module. isa ( ) ,
83
+ false ,
84
+ Symbol :: intern ( "dummy_cgu_name" ) ,
85
+ ) ;
79
86
80
87
crate :: allocator:: codegen ( tcx, & mut jit_module, & mut cx. unwind_context ) ;
81
88
crate :: main_shim:: maybe_create_entry_wrapper (
@@ -245,7 +252,13 @@ fn jit_fn(instance_ptr: *const Instance<'static>, trampoline_ptr: *const u8) ->
245
252
246
253
jit_module. prepare_for_function_redefine ( func_id) . unwrap ( ) ;
247
254
248
- let mut cx = crate :: CodegenCx :: new ( tcx, backend_config, jit_module. isa ( ) , false ) ;
255
+ let mut cx = crate :: CodegenCx :: new (
256
+ tcx,
257
+ backend_config,
258
+ jit_module. isa ( ) ,
259
+ false ,
260
+ Symbol :: intern ( "dummy_cgu_name" ) ,
261
+ ) ;
249
262
tcx. sess . time ( "codegen fn" , || crate :: base:: codegen_fn ( & mut cx, jit_module, instance) ) ;
250
263
251
264
assert ! ( cx. global_asm. is_empty( ) ) ;
0 commit comments