gallivm: export target init code for orc-jit to reuse

It doesn't need the wrapper since it already has a singleton

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29869>
This commit is contained in:
Dave Airlie 2024-06-24 13:38:55 +10:00
parent 1f4268b53e
commit 76e2ceb8f8
2 changed files with 4 additions and 2 deletions

View file

@ -108,7 +108,7 @@ static LLVMEnsureMultithreaded lLVMEnsureMultithreaded;
static once_flag init_native_targets_once_flag = ONCE_FLAG_INIT;
static void init_native_targets()
void lp_bld_init_native_targets()
{
// If we have a native target, initialize it to ensure it is linked in and
// usable by the JIT.
@ -150,7 +150,7 @@ lp_set_target_options(void)
* LLVM targets should be initialized before the driver or gallium frontend tries
* to access the registry.
*/
call_once(&init_native_targets_once_flag, init_native_targets);
call_once(&init_native_targets_once_flag, lp_bld_init_native_targets);
}
extern "C"

View file

@ -64,6 +64,8 @@ gallivm_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info);
extern void
lp_set_target_options(void);
extern void
lp_bld_init_native_targets();
extern int
lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,