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>
This commit is contained in:
Eric Engestrom 2025-08-18 17:33:31 -04:00 committed by Marge Bot
parent e3476b4dbd
commit 1fad1516b8
2 changed files with 10 additions and 1 deletions

View file

@ -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()

View file

@ -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)'
)