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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
From 866d8a55d110d7ea8f328bb850c1870c0acc4d0e Mon Sep 17 00:00:00 2001
From: Karol Herbst <kherbst@redhat.com>
Date: Fri, 17 May 2024 23:25:12 +0200
Subject: [PATCH 1/2] rusticl/meson: add build root dir to the include dirs of
rusticl_c
The static inline wrapper includes the header file relatively from where
`bindgen` gets executed, or so it seems.
And because meson doesn't allow us to add absolute paths, fs.relative_to
needs to be used. I'm sure we can come up with a better solution, but this
unbreaks builds.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11178
Fixes: 53629b0a2d4 ("rusticl: make use of new `output_inline_wrapper` meson.rust.bindgen feature")
---
src/gallium/frontends/rusticl/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build
index 5414213b3bb1a..192c352285a5e 100644
--- a/src/gallium/frontends/rusticl/meson.build
+++ b/src/gallium/frontends/rusticl/meson.build
@@ -18,6 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+fs = import('fs')
rust = import('rust')
libmesa_rust_util_files = files(
@@ -348,6 +349,7 @@ rusticl_c = static_library(
],
gnu_symbol_visibility : 'hidden',
include_directories : [
+ fs.relative_to(meson.project_build_root(), meson.current_source_dir()),
inc_gallium,
inc_gallium_aux,
inc_include,
--
GitLab
From 9695391624e8f3d889e9ded091b0d369f45761f5 Mon Sep 17 00:00:00 2001
From: Karol Herbst <kherbst@redhat.com>
Date: Mon, 10 Jun 2024 12:20:14 +0200
Subject: [PATCH 2/2] rusticl: depend on the spirv_info target
Hit this while building only rusticl_mesa_bindings.
Fixes: a09c5d55ed7 ("spirv: Auto-generate spirv_info.h")
---
src/gallium/frontends/rusticl/meson.build | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build
index 192c352285a5e..72aa38de77217 100644
--- a/src/gallium/frontends/rusticl/meson.build
+++ b/src/gallium/frontends/rusticl/meson.build
@@ -255,6 +255,10 @@ rusticl_libc_bindings_rs = rust.bindgen(
]
)
+_idep_mesa_bindings = declare_dependency(
+ sources : spirv_info,
+)
+
rusticl_mesa_bindings = rust.bindgen(
input : 'rusticl_mesa_bindings.h',
output : 'rusticl_mesa_bindings.rs',
@@ -266,6 +270,7 @@ rusticl_mesa_bindings = rust.bindgen(
inc_src,
],
dependencies: [
+ _idep_mesa_bindings,
idep_nir_headers,
dep_valgrind,
],
--
GitLab
|