Mesa (staging/18.2): meson: don't require libelf for r600 without LLVM
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 24 09:00:25 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: 9d63cd4ac2e4fd7075b15ebf81aacfdc05b9bf25
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d63cd4ac2e4fd7075b15ebf81aacfdc05b9bf25
Author: Dylan Baker <dylan at pnwbakers.com>
Date: Mon Oct 22 07:26:44 2018 -0700
meson: don't require libelf for r600 without LLVM
r600 doesn't have a hard requirement on LLVM, and therefore doesn't have
a hard requirement on libelf. Currently the logic doesn't allow that
however.
Distro-bug: https://bugs.gentoo.org/669058
Fixes: 5060c51b6f4dfb0d5358bde6523285163d3faaad
("meson: build r600 driver")
Reviewed-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 4e785fb383eaa80e7def0d639eddefb781ec3f4f)
---
meson.build | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/meson.build b/meson.build
index f272b34490..5b0eea10a3 100644
--- a/meson.build
+++ b/meson.build
@@ -1061,14 +1061,6 @@ dep_thread = dependency('threads')
if dep_thread.found() and host_machine.system() != 'windows'
pre_args += '-DHAVE_PTHREAD'
endif
-if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 or with_gallium_opencl
- dep_elf = dependency('libelf', required : false)
- if not dep_elf.found()
- dep_elf = cc.find_library('elf')
- endif
-else
- dep_elf = null_dep
-endif
dep_expat = dependency('expat')
# this only exists on linux so either this is linux and it will be found, or
# its not linux and and wont
@@ -1225,6 +1217,16 @@ elif with_amd_vk or with_gallium_radeonsi or with_gallium_swr
error('The following drivers require LLVM: Radv, RadeonSI, SWR. One of these is enabled, but LLVM is disabled.')
endif
+if (with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or
+ (with_gallium_r600 and with_llvm))
+ dep_elf = dependency('libelf', required : false)
+ if not dep_elf.found()
+ dep_elf = cc.find_library('elf')
+ endif
+else
+ dep_elf = null_dep
+endif
+
dep_glvnd = null_dep
if with_glvnd
dep_glvnd = dependency('libglvnd', version : '>= 0.2.0')
More information about the mesa-commit
mailing list