[Mesa-stable] [PATCH v2 2/2] meson: swr: do a second llvm search with extra modules for llvm >= 7
Chuck Atkins
chuck.atkins at kitware.com
Mon Sep 24 19:58:26 UTC 2018
Signed-off-by: Chuck Atkins <chuck.atkins at kitware.com>
CC: <mesa-stable at lists.freedesktop.org>
CC: Dylan Baker <dylan at pnwbakers.com>
CC: Bruce Cherniak <bruce.cherniak at intel.com>
CC: Tim Rowley <timothy.o.rowley at intel.com>
---
meson.build | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/meson.build b/meson.build
index cbf88b5013..a7e03c29dc 100644
--- a/meson.build
+++ b/meson.build
@@ -1160,27 +1160,38 @@ else
endif
_llvm = get_option('llvm')
-if _llvm == 'auto'
+if _llvm == 'false'
+ dep_llvm = null_dep
+ with_llvm = false
+else
+ _llvm_req = true
+ if _llvm == 'auto'
+ _llvm_req = with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl
+ endif
dep_llvm = dependency(
'llvm',
version : _llvm_version,
modules : llvm_modules,
optional_modules : llvm_optional_modules,
- required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl,
+ required : _llvm_req,
)
+ _llvm_2pass = false
+ if dep_llvm.found() and with_gallium_swr and dep_llvm.version().version_compare('>= 7')
+ _llvm_2pass = true
+ llvm_modules += ['ipo', 'objcarcopts']
+ endif
+ if _llvm_2pass
+ dep_llvm = dependency(
+ 'llvm',
+ version : _llvm_version,
+ modules : llvm_modules,
+ optional_modules : llvm_optional_modules,
+ required : _llvm_req,
+ )
+ endif
with_llvm = dep_llvm.found()
-elif _llvm == 'true'
- dep_llvm = dependency(
- 'llvm',
- version : _llvm_version,
- modules : llvm_modules,
- optional_modules : llvm_optional_modules,
- )
- with_llvm = true
-else
- dep_llvm = null_dep
- with_llvm = false
endif
+
if with_llvm
_llvm_version = dep_llvm.version().split('.')
# Development versions of LLVM have an 'svn' or 'git' suffix, we don't want
--
2.12.2
More information about the mesa-stable
mailing list