summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2022-09-20 23:10:22 +0800
committerMarge Bot <emma+marge@anholt.net>2022-09-22 05:07:35 +0000
commitc74595ead3f431705edc5e32df6b88a259239237 (patch)
treed764e386c69282a84c0d6b742036e7b069bec8e4 /meson.build
parent3f18709f1f9722891c836812875cb0816c578236 (diff)
downloadmesa-c74595ead3f431705edc5e32df6b88a259239237.tar.gz
mesa-c74595ead3f431705edc5e32df6b88a259239237.tar.bz2
mesa-c74595ead3f431705edc5e32df6b88a259239237.zip
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>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 6 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index eb419e410f5..43d14352897 100644
--- a/meson.build
+++ b/meson.build
@@ -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