Remove special case in maybe_create_entry_wrapper
This commit is contained in:
parent
c41a7db24f
commit
88d10687b0
@ -83,13 +83,6 @@ fn create_jit_module(
|
|||||||
);
|
);
|
||||||
|
|
||||||
crate::allocator::codegen(tcx, &mut jit_module, &mut cx.unwind_context);
|
crate::allocator::codegen(tcx, &mut jit_module, &mut cx.unwind_context);
|
||||||
crate::main_shim::maybe_create_entry_wrapper(
|
|
||||||
tcx,
|
|
||||||
&mut jit_module,
|
|
||||||
&mut cx.unwind_context,
|
|
||||||
true,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
(jit_module, cx)
|
(jit_module, cx)
|
||||||
}
|
}
|
||||||
@ -153,6 +146,14 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
|
|||||||
tcx.dcx().fatal("Inline asm is not supported in JIT mode");
|
tcx.dcx().fatal("Inline asm is not supported in JIT mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crate::main_shim::maybe_create_entry_wrapper(
|
||||||
|
tcx,
|
||||||
|
&mut jit_module,
|
||||||
|
&mut cx.unwind_context,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
|
||||||
tcx.dcx().abort_if_errors();
|
tcx.dcx().abort_if_errors();
|
||||||
|
|
||||||
jit_module.finalize_definitions().unwrap();
|
jit_module.finalize_definitions().unwrap();
|
||||||
|
@ -29,7 +29,7 @@ pub(crate) fn maybe_create_entry_wrapper(
|
|||||||
|
|
||||||
if main_def_id.is_local() {
|
if main_def_id.is_local() {
|
||||||
let instance = Instance::mono(tcx, main_def_id).polymorphize(tcx);
|
let instance = Instance::mono(tcx, main_def_id).polymorphize(tcx);
|
||||||
if !is_jit && module.get_name(tcx.symbol_name(instance).name).is_none() {
|
if module.get_name(tcx.symbol_name(instance).name).is_none() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if !is_primary_cgu {
|
} else if !is_primary_cgu {
|
||||||
|
Loading…
Reference in New Issue
Block a user