[Mesa-dev] [PATCH v2 2/4] meson: handle LLVM 'x.x.xgit-revision' versions
Greg V
greg at unrelenting.technology
Wed Jan 17 20:54:16 UTC 2018
When LLVM is built inside of a git repo (even way below, e.g. /usr/ports/.git
exists, and LLVM is built in /usr/ports/devel/llvm50/work), its version
becomes something like 5.0.0git-f8ab206b2176.
New meson versions already handle this, but we support older versions too.
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
---
meson.build | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 32cd5dffa4..2e7816b720 100644
--- a/meson.build
+++ b/meson.build
@@ -1020,11 +1020,15 @@ else
endif
if with_llvm
_llvm_version = dep_llvm.version().split('.')
- # Development versions of LLVM have an 'svn' suffix, we don't want that for
- # our version checks.
+ # Development versions of LLVM have an 'svn' or 'git' suffix, we don't want
+ # that for our version checks.
+ # svn suffixes are stripped by meson as of 0.43, and git suffixes are
+ # strippped as of 0.44, but we support older meson versions.
_llvm_patch = _llvm_version[2]
if _llvm_patch.endswith('svn')
_llvm_patch = _llvm_patch.split('s')[0]
+ elif _llvm_patch.contains('git')
+ _llvm_patch = _llvm_patch.split('g')[0]
endif
pre_args += [
'-DHAVE_LLVM=0x0 at 0@@1@@2@'.format(_llvm_version[0], _llvm_version[1], _llvm_patch),
--
2.15.1
More information about the mesa-dev
mailing list