radeonsi: does not call llvm init when no llvm available

It's still needed when aco asm print.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25632>
This commit is contained in:
Qiang Yu 2023-09-12 10:25:57 +08:00
parent ed2e2038de
commit 9db67311cf

View file

@ -1545,6 +1545,7 @@ struct pipe_screen *radeonsi_screen_create(int fd, const struct pipe_screen_conf
if (!version)
return NULL;
#ifdef LLVM_AVAILABLE
/* LLVM must be initialized before util_queue because both u_queue and LLVM call atexit,
* and LLVM must call it first because its atexit handler executes C++ destructors,
* which must be done after our compiler threads using LLVM in u_queue are finished
@ -1552,6 +1553,7 @@ struct pipe_screen *radeonsi_screen_create(int fd, const struct pipe_screen_conf
* LLVM must be initialized first, followed by u_queue.
*/
ac_init_llvm_once();
#endif
driParseConfigFiles(config->options, config->options_info, 0, "radeonsi",
NULL, NULL, NULL, 0, NULL, 0);