meson: libelf is optional

..otherwise seeing ERROR: C shared or static library 'elf' not found

Fixes: c74595ead3 ("radv/r600/clover: Getting libelf to be optional")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18805>
This commit is contained in:
Yiwei Zhang
2022-09-25 05:12:54 +00:00
committed by Marge Bot
parent 37900ee2dd
commit e0b7430eae

View File

@@ -1935,7 +1935,7 @@ endif
dep_elf = dependency('libelf', required : false)
if not with_platform_windows and not dep_elf.found()
dep_elf = cc.find_library('elf')
dep_elf = cc.find_library('elf', required : false)
endif
if dep_elf.found()
pre_args += '-DUSE_LIBELF'