blob: 3631a918b0c05b5dbb2aa64f08fce7fc6449573e [file] [log] [blame]
Andrew Geissler8f840682023-07-21 09:09:43 -05001From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 23 Jun 2023 01:20:38 -0700
4Subject: [PATCH] gallium: Fix build with llvm 17
5
6These headers are not available for C files in llvm 17+
7and they seem to be not needed to compile after all with llvm 17
8so add conditions to exclude them for llvm >= 17
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
17index 24d0823..3d4573e 100644
18--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
19+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
20@@ -42,8 +42,10 @@
21
22 #include <llvm/Config/llvm-config.h>
23 #include <llvm-c/Analysis.h>
24+#if LLVM_VERSION_MAJOR < 17
25 #include <llvm-c/Transforms/Scalar.h>
26-#if LLVM_VERSION_MAJOR >= 7
27+#endif
28+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
29 #include <llvm-c/Transforms/Utils.h>
30 #endif
31 #include <llvm-c/BitWriter.h>
32--
332.41.0
34