diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 88ef1cc96e2d5..5c12340b2a910 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -62,14 +62,17 @@ void jl_jit_globals(std::map &globals) } } + // this generates llvm code for the lambda info // and adds the result to the jitlayers // (and the shadow module), // and generates code for it -static jl_callptr_t _jl_compile_codeinst( +extern "C" { +JL_DLLEXPORT jl_callptr_t jl_compile_codeinst( jl_code_instance_t *codeinst, jl_code_info_t *src, - size_t world) + size_t world, + const jl_cgparams_t *cg_params) { // TODO: Merge with jl_dump_compiles? static ios_t f_precompile; @@ -91,6 +94,7 @@ static jl_callptr_t _jl_compile_codeinst( jl_codegen_params_t params; params.cache = true; params.world = world; + params.params = cg_params; std::map emitted; { JL_TIMING(CODEGEN); @@ -196,6 +200,15 @@ static jl_callptr_t _jl_compile_codeinst( } return fptr; } +} + +static jl_callptr_t _jl_compile_codeinst( + jl_code_instance_t *codeinst, + jl_code_info_t *src, + size_t world) +{ + return jl_compile_codeinst(codeinst, src, world, &jl_default_cgparams); +} Function *jl_generate_ccallable(void *llvmmod, void *sysimg_handle, jl_value_t *declrt, jl_value_t *sigt, jl_codegen_params_t ¶ms);