From 9db67311cf483f7c204e2152ee05e4f14e4b2f8b Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 12 Sep 2023 10:25:57 +0800 Subject: [PATCH] radeonsi: does not call llvm init when no llvm available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's still needed when aco asm print. Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/gallium/drivers/radeonsi/si_pipe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 48431df1eab..af27ab1450c 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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);