summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch b/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch
new file mode 100644
index 0000000000..82ad88a079
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch
@@ -0,0 +1,41 @@
1From 777d69cf15b80ab1f109a4936d6e4801c4b0e0f3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 1 Jul 2024 23:09:29 -0700
4Subject: [PATCH] amd: Include missing llvm IR header Module.h
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9With LLVM-19, Module.h header is not being pulled, which results in
10compile errors e.g.
11
12src/amd/llvm/ac_llvm_helper.cpp:102:10: error: no matching function for call to ‘unwrap(LLVMOpaqueModule*&)’
13 102 | unwrap(module)->setTargetTriple(TM->getTargetTriple().getTriple());
14 | ~~~~~~^~~~~~~~
15In file included from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/Type.h:18,
16 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/DerivedTypes.h:23,
17 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/InstrTypes.h:26,
18 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/Analysis/TargetLibraryInfo.h:14,
19 from ../mesa-24.0.7/src/amd/llvm/ac_llvm_helper.cpp:8:
20
21Its getting the definition from llvm/IR/Type.h instead of Module.h and caused
22confusion to compiler
23
24Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29993]
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 src/amd/llvm/ac_llvm_helper.cpp | 1 +
28 1 file changed, 1 insertion(+)
29
30diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp
31index 5d065279ad1..af4a50f8409 100644
32--- a/src/amd/llvm/ac_llvm_helper.cpp
33+++ b/src/amd/llvm/ac_llvm_helper.cpp
34@@ -8,6 +8,7 @@
35 #include <llvm/Analysis/TargetLibraryInfo.h>
36 #include <llvm/IR/IRBuilder.h>
37 #include <llvm/IR/LegacyPassManager.h>
38+#include <llvm/IR/Module.h>
39 #include <llvm/IR/Verifier.h>
40 #include <llvm/Target/TargetMachine.h>
41 #include <llvm/MC/MCSubtargetInfo.h>