clover: Add opencl-native build flag

This flag controls whether to include native codegen functionality
for the AMD backend

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
This commit is contained in:
Jesse Natalie
2020-11-18 18:27:07 -08:00
parent 60454a4e99
commit 425cfcafb2
4 changed files with 36 additions and 4 deletions

View File

@@ -1611,7 +1611,10 @@ else
dep_llvmspirvlib = null_dep
endif
if (with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or
with_opencl_native = _opencl != 'disabled' and get_option('opencl-native')
if (with_amd_vk or with_gallium_radeonsi or
(with_gallium_opencl and with_opencl_native) or
(with_gallium_r600 and with_llvm))
dep_elf = dependency('libelf', required : false)
if not dep_elf.found()