From 1fad1516b88c3decc00bc36884d41ad07823d940 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 18 Aug 2025 17:33:31 -0400 Subject: [PATCH] meson: add spirv-tools option to disable the optional dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- meson.build | 5 ++++- meson.options | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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)' +)