From 9777a33824c1f954dc334ad3de7618b173998eb6 Mon Sep 17 00:00:00 2001 From: Cody Tapscott <84105208+topolarity@users.noreply.github.com> Date: Thu, 30 Jan 2025 07:55:51 -0500 Subject: [PATCH] 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` --- src/codegen-stubs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/codegen-stubs.c b/src/codegen-stubs.c index 5e243ddda28c9..6b547251eaab8 100644 --- a/src/codegen-stubs.c +++ b/src/codegen-stubs.c @@ -73,7 +73,10 @@ JL_DLLEXPORT uint32_t jl_get_LLVM_VERSION_fallback(void) JL_DLLEXPORT int jl_compile_extern_c_fallback(LLVMOrcThreadSafeModuleRef llvmmod, void *params, void *sysimg, jl_value_t *declrt, jl_value_t *sigt) { - return 0; + // Assume we were able to register the ccallable with the JIT. The + // fact that we didn't is not observable since we cannot compile + // anything else. + return 1; } JL_DLLEXPORT void jl_teardown_codegen_fallback(void) JL_NOTSAFEPOINT