diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-14 15:24:14 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-04-27 17:30:46 +0200 |
| commit | 88b5f5722a23800474d2c6b192dd5129590b4254 (patch) | |
| tree | f79da362904898070dc1dce32ed786d1abdd9278 | |
| parent | 5e0c62372c77e44793bfb1609ab67ebb2af6a1f3 (diff) | |
| download | rust-88b5f5722a23800474d2c6b192dd5129590b4254.tar.gz rust-88b5f5722a23800474d2c6b192dd5129590b4254.zip | |
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
| -rw-r--r-- | src/driver/jit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/driver/jit.rs b/src/driver/jit.rs index 7f15bc75fda..1b01f4edbb3 100644 --- a/src/driver/jit.rs +++ b/src/driver/jit.rs @@ -74,6 +74,7 @@ fn create_jit_module<'tcx>( jit_builder.hotswap(hotswap); crate::compiler_builtins::register_functions_for_jit(&mut jit_builder); jit_builder.symbols(imported_symbols); + jit_builder.symbol("__clif_jit_fn", clif_jit_fn as *const u8); let mut jit_module = JITModule::new(jit_builder); let mut cx = crate::CodegenCx::new( @@ -210,8 +211,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! { } } -#[no_mangle] -extern "C" fn __clif_jit_fn( +extern "C" fn clif_jit_fn( instance_ptr: *const Instance<'static>, trampoline_ptr: *const u8, ) -> *const u8 { |
