Skip to content

Commit 88b5f57

Browse files
committed
Use jit_builder.symbol instead of #[no_mangle] for __clif_jit_fn
#[no_mangle] doesn't resolve when the codegen backend is opened with RTLD_LOCAL
1 parent 5e0c623 commit 88b5f57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/driver/jit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ fn create_jit_module<'tcx>(
7474
jit_builder.hotswap(hotswap);
7575
crate::compiler_builtins::register_functions_for_jit(&mut jit_builder);
7676
jit_builder.symbols(imported_symbols);
77+
jit_builder.symbol("__clif_jit_fn", clif_jit_fn as *const u8);
7778
let mut jit_module = JITModule::new(jit_builder);
7879

7980
let mut cx = crate::CodegenCx::new(
@@ -210,8 +211,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
210211
}
211212
}
212213

213-
#[no_mangle]
214-
extern "C" fn __clif_jit_fn(
214+
extern "C" fn clif_jit_fn(
215215
instance_ptr: *const Instance<'static>,
216216
trampoline_ptr: *const u8,
217217
) -> *const u8 {

0 commit comments

Comments
 (0)