summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch b/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
deleted file mode 100644
index d65ba574d2..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From f9b6175e7c446a82c568ff1a214885d707c95f49 Mon Sep 17 00:00:00 2001
2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3Date: Wed, 16 Apr 2025 14:35:37 +0300
4Subject: [PATCH] mesa-clc: add an option to force inclusion of OpenCL headers
5
6Currently mesa-clc bundles OpenCL headers from Clang only if the static
7LLVM is used (which means Clang / LLVM are not present on the target
8system). In some cases (e.g. when building in OpenEmbedded environemnt)
9it is desirable to have shared LLVM library, but skip installing the
10whole Clang runtime just to compile shaders. Add an option that forces
11OpenCL headers to be bundled with the mesa-clc binary.
12
13Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
14Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34551]
15---
16 meson_options.txt | 10 ++++++++++
17 src/compiler/clc/meson.build | 3 ++-
18 2 files changed, 12 insertions(+), 1 deletion(-)
19
20diff --git a/meson_options.txt b/meson_options.txt
21index 18da31eff507..addd274ecef7 100644
22--- a/meson_options.txt
23+++ b/meson_options.txt
24@@ -797,6 +797,16 @@ option(
25 description : 'Install the mesa-clc compiler (if needed for cross builds).'
26 )
27
28+option(
29+ 'mesa-clc-bundle-headers',
30+ type : 'combo',
31+ value : 'auto',
32+ choices : [
33+ 'enabled', 'auto'
34+ ],
35+ description : 'Bundle the OpenCL headers into the mesa-clc binary (default to bundle if static LLVM is used). Note, it might require rebuilding mesa-clc if opencl-c.h or opencl-c-base.h are changed (e.g. on Clang upgrades).'
36+)
37+
38 option(
39 'precomp-compiler',
40 type : 'combo',
41diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build
42index 263eba527191..9ff61440f0da 100644
43--- a/src/compiler/clc/meson.build
44+++ b/src/compiler/clc/meson.build
45@@ -11,7 +11,8 @@ _libmesaclc_c_args = []
46 _libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)]
47 _libmesaclc_sources = []
48
49-if not _shared_llvm
50+if not _shared_llvm or \
51+ get_option('mesa-clc-bundle-headers') == 'enabled'
52 # LLVM 16 moved clang header path from using full version to only major version
53 if dep_llvm.version().version_compare('< 16')
54 # Prior to LLVM 16, this path used a full version
55--
562.47.2
57