Reviewed-by: Juan A. Suarez <jasua...@igalia.com>

On Sun, 2017-12-31 at 19:55 +0300, Greg V wrote:
> 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.
> 
> Don't blow up on these versions.
> ---
>  meson.build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 23faad0a71..0e8e695965 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -994,9 +994,12 @@ 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.
> +  # Also LLVM can end up with a 'git-$revision' suffix if built inside a git 
> repo.
>    _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@0@@1@@2@'.format(_llvm_version[0], _llvm_version[1], 
> _llvm_patch),
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to