summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-02-02 10:45:12 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-02-02 13:22:58 -0800
commitc75a4e5b465261e982ea31ef875325a3cc30e79d (patch)
tree0c084c27f9d544183c63f1145f5290de01ad673e
parentd7235ef83b92175537e3b538634ffcff29bf0dce (diff)
meson: Check for actual LLVM required versions
Currently we always check for 3.9.0, which is pretty safe since everything except radv work with >= 3.9 and 3.9 is pretty old at this point. However, radv actually requires 4.0, and there is a patch for radeonsi to do the same. Fixes: 673dda833076 ("meson: build "radv" vulkan driver for radeon hardware") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
-rw-r--r--meson.build12
1 files changed, 10 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 323f706271..cb3b6587b4 100644
--- a/meson.build
+++ b/meson.build
@@ -992,15 +992,23 @@ if with_gallium_opencl
# TODO: optional modules
endif
+if with_amd_vk
+ _llvm_version = '>= 4.0.0'
+elif with_gallium_opencl or with_gallium_swr or with_gallium_r600 or with_gallium_radeonsi
+ _llvm_version = '>= 3.9.0'
+else
+ _llvm_version = '>= 3.3.0'
+endif
+
_llvm = get_option('llvm')
if _llvm == 'auto'
dep_llvm = dependency(
- 'llvm', version : '>= 3.9.0', modules : llvm_modules,
+ 'llvm', version : _llvm_version, modules : llvm_modules,
required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl,
)
with_llvm = dep_llvm.found()
elif _llvm == 'true'
- dep_llvm = dependency('llvm', version : '>= 3.9.0', modules : llvm_modules)
+ dep_llvm = dependency('llvm', version : _llvm_version, modules : llvm_modules)
with_llvm = true
else
dep_llvm = []