Skip to content

Commit 9777a33

Browse files
authored
codegen (stubs): report success when registering @ccallable (#57200)
This is required to be able to load a sysimage with ccallable entrypoints without `libjulia-codegen.so`
1 parent 683c5e7 commit 9777a33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/codegen-stubs.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ JL_DLLEXPORT uint32_t jl_get_LLVM_VERSION_fallback(void)
7373

7474
JL_DLLEXPORT int jl_compile_extern_c_fallback(LLVMOrcThreadSafeModuleRef llvmmod, void *params, void *sysimg, jl_value_t *declrt, jl_value_t *sigt)
7575
{
76-
return 0;
76+
// Assume we were able to register the ccallable with the JIT. The
77+
// fact that we didn't is not observable since we cannot compile
78+
// anything else.
79+
return 1;
7780
}
7881

7982
JL_DLLEXPORT void jl_teardown_codegen_fallback(void) JL_NOTSAFEPOINT

0 commit comments

Comments
 (0)