clover: fix meson opencl-spirv option

As reported by https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
this option is broken. Indeed, when "with_clc" is false the compilation
process failed with the following error:
"ERROR: Unknown variable "idep_mesaclc".

Fixes: 815a6647eb ("meson: do not pull in clc for clover")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
This commit is contained in:
Patrick Lerda
2024-06-02 15:50:20 +02:00
committed by Marge Bot
parent 746f41e705
commit 82e9880b04
2 changed files with 6 additions and 7 deletions

View File

@@ -335,7 +335,6 @@ if with_aco_tests and not with_amd_vk
endif
with_microsoft_clc = get_option('microsoft-clc').enabled()
with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi
with_spirv_to_dxil = get_option('spirv-to-dxil')
if host_machine.system() == 'darwin'
@@ -852,10 +851,11 @@ if with_gallium_rusticl
add_languages('rust', required: true)
rustc = meson.get_compiler('rust')
with_clc = true
endif
with_clover_spirv = with_gallium_opencl and get_option('opencl-spirv')
with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_gallium_rusticl or with_clover_spirv
dep_clc = null_dep
if with_gallium_opencl or with_clc
dep_clc = dependency('libclc')
@@ -1845,8 +1845,7 @@ pre_args += '-DLLVM_AVAILABLE=@0@'.format(with_llvm.to_int())
pre_args += '-DDRAW_LLVM_AVAILABLE=@0@'.format((with_llvm and draw_with_llvm).to_int())
pre_args += '-DAMD_LLVM_AVAILABLE=@0@'.format(amd_with_llvm.to_int())
with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_clc
if with_opencl_spirv
if with_clover_spirv or with_clc
chosen_llvm_version_array = dep_llvm.version().split('.')
chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()