Skip to content

Commit 88d1068

Browse files
committed
Remove special case in maybe_create_entry_wrapper
1 parent c41a7db commit 88d1068

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/driver/jit.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ fn create_jit_module(
8383
);
8484

8585
crate::allocator::codegen(tcx, &mut jit_module, &mut cx.unwind_context);
86-
crate::main_shim::maybe_create_entry_wrapper(
87-
tcx,
88-
&mut jit_module,
89-
&mut cx.unwind_context,
90-
true,
91-
true,
92-
);
9386

9487
(jit_module, cx)
9588
}
@@ -153,6 +146,14 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
153146
tcx.dcx().fatal("Inline asm is not supported in JIT mode");
154147
}
155148

149+
crate::main_shim::maybe_create_entry_wrapper(
150+
tcx,
151+
&mut jit_module,
152+
&mut cx.unwind_context,
153+
true,
154+
true,
155+
);
156+
156157
tcx.dcx().abort_if_errors();
157158

158159
jit_module.finalize_definitions().unwrap();

src/main_shim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) fn maybe_create_entry_wrapper(
2929

3030
if main_def_id.is_local() {
3131
let instance = Instance::mono(tcx, main_def_id).polymorphize(tcx);
32-
if !is_jit && module.get_name(tcx.symbol_name(instance).name).is_none() {
32+
if module.get_name(tcx.symbol_name(instance).name).is_none() {
3333
return;
3434
}
3535
} else if !is_primary_cgu {

0 commit comments

Comments
 (0)