About Social Code
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Engestrom <eric@igalia.com>2025-08-18 17:33:31 -0400
committerMarge Bot <marge-bot@fdo.invalid>2025-08-20 12:50:40 +0000
commit1fad1516b88c3decc00bc36884d41ad07823d940 (patch)
tree152ec0cf4d71fc788b896e1accd34723c0970c9e
parente3476b4dbd7d8456c34af3063f9c1178786e9789 (diff)
meson: add spirv-tools option to disable the optional dependency
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36689>
-rw-r--r--meson.build5
-rw-r--r--meson.options6
2 files changed, 10 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 3d99870b68b..42994e11ccb 100644
--- a/meson.build
+++ b/meson.build
@@ -1862,9 +1862,12 @@ else
dep_llvmspirvlib = null_dep
endif
+with_spirv_tools = get_option('spirv-tools') \
+ .enable_if(with_clc, error_message : 'CLC requires SPIRV-Tools')
+
dep_spirv_tools = dependency(
'SPIRV-Tools',
- required : with_clc,
+ required : with_spirv_tools,
version : '>= 2024.1'
)
if dep_spirv_tools.found()
diff --git a/meson.options b/meson.options
index 2b511687293..71d7640661f 100644
--- a/meson.options
+++ b/meson.options
@@ -851,3 +851,9 @@ option(
value : false,
description : 'Build virtgpu_kumquat (only useful with gfxstream currently)'
)
+
+option(
+ 'spirv-tools',
+ type : 'feature',
+ description : 'Use SPIRV-Tools for dumping SPIR-V for debugging purposes (required by CLC)'
+)