summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
blob: 3631a918b0c05b5dbb2aa64f08fce7fc6449573e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
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

Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 24d0823..3d4573e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -42,8 +42,10 @@
 
 #include <llvm/Config/llvm-config.h>
 #include <llvm-c/Analysis.h>
+#if LLVM_VERSION_MAJOR < 17
 #include <llvm-c/Transforms/Scalar.h>
-#if LLVM_VERSION_MAJOR >= 7
+#endif
+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
 #include <llvm-c/Transforms/Utils.h>
 #endif
 #include <llvm-c/BitWriter.h>
-- 
2.41.0