summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch67
1 files changed, 0 insertions, 67 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch b/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
deleted file mode 100644
index d527b34087..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From b9cf34f39ca7e7546508ce2ab1f053edef5fc201 Mon Sep 17 00:00:00 2001
2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3Date: Wed, 26 Mar 2025 17:47:09 +0200
4Subject: [PATCH] rusticl: provide cross-compilation arguments to LLVM bindgen
5 invocation
6
7Correctly generating LLVM bindings requires several croos-compilation
8arguments. Provide them to rust.bindgen(). Karol Herbst on IRC suggested
9that a proper fix should be to fix meson's rust.bindgen() to support
10cross-compilation. Carry this patch until meson is fixed.
11
12Upstream-Status: Inappropriate [OE-Specific]
13Link: https://github.com/mesonbuild/meson/issues/13591
14Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
15---
16 meson_options.txt | 14 ++++++++++++++
17 src/gallium/frontends/rusticl/meson.build | 8 ++++++++
18 2 files changed, 22 insertions(+)
19
20diff --git a/meson_options.txt b/meson_options.txt
21index 0147cafcb146..f73e83fded18 100644
22--- a/meson_options.txt
23+++ b/meson_options.txt
24@@ -796,3 +796,17 @@ option(
25 value : false,
26 description : 'Install the drivers internal shader compilers (if needed for cross builds).'
27 )
28+
29+option(
30+ 'bindgen-includedir',
31+ type : 'string',
32+ value : '',
33+ description : 'system-wide include directory for cross-generating LLVM bindings'
34+ )
35+
36+option(
37+ 'bindgen-target',
38+ type : 'string',
39+ value : '',
40+ description : 'Clang target for cross-generating LLVM bindings'
41+ )
42diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build
43index a5d1dcf3abb9..480c220b7f5f 100644
44--- a/src/gallium/frontends/rusticl/meson.build
45+++ b/src/gallium/frontends/rusticl/meson.build
46@@ -115,6 +115,11 @@ rusticl_bindgen_c_args = [
47 '-fno-builtin-malloc',
48 ]
49
50+bindgen_target = get_option('bindgen-target')
51+if bindgen_target != ''
52+ rusticl_bindgen_c_args += [ '-target', bindgen_target ]
53+endif
54+
55 cl_c_args = [
56 '-DCL_USE_DEPRECATED_OPENCL_1_0_APIS',
57 '-DCL_USE_DEPRECATED_OPENCL_1_1_APIS',
58@@ -187,6 +192,9 @@ rusticl_llvm_bindings_rs = rust.bindgen(
59 rusticl_bindgen_c_args,
60 pre_args,
61 ],
62+ include_directories : [
63+ get_option('bindgen-includedir'),
64+ ],
65 dependencies : [
66 dep_clang,
67 dep_llvm,