radv/r600/clover: Getting libelf to be optional

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18503>
This commit is contained in:
Yonggang Luo
2022-09-20 23:10:22 +08:00
committed by Marge Bot
parent 3f18709f1f
commit c74595ead3
10 changed files with 23 additions and 32 deletions

View File

@@ -1903,17 +1903,12 @@ if host_machine.system() == 'windows'
dep_version = cpp.find_library('version')
endif
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 with_platform_windows and not dep_elf.found()
dep_elf = cc.find_library('elf')
endif
else
dep_elf = null_dep
dep_elf = dependency('libelf', required : false)
if not with_platform_windows and not dep_elf.found()
dep_elf = cc.find_library('elf')
endif
if dep_elf.found()
pre_args += '-DUSE_LIBELF'
endif
dep_glvnd = null_dep