From 919d6d420f49b61096b5ebfc65cfb3866a427e73 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 23 Jun 2023 01:20:38 -0700 Subject: [PATCH] gallium: Fix build with llvm 17 These headers are not available for C files in llvm 17+ and they seem to be not needed to compile after all with llvm 17 so add conditions to exclude them for llvm >= 17 Signed-off-by: Khem Raj --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index cd2108f3a088d..7131ec8667ecf 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -45,16 +45,18 @@ #include #if GALLIVM_USE_NEW_PASS == 1 #include -#elif GALLIVM_HAVE_CORO == 1 +#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17 #include -#if LLVM_VERSION_MAJOR >= 7 +#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 #include #endif #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) #include #endif +#if LLVM_VERSION_MAJOR < 17 #include #endif +#endif unsigned gallivm_perf = 0; -- GitLab