[Mesa-dev] [PATCH 10/14] meson: handle LLVM 'x.x.xgit-revision' versions

Dylan Baker dylan at pnwbakers.com
Fri Jan 5 22:29:39 UTC 2018


Please add a comment that svn suffixes are stripped by meson as of 0.43, and git
suffixes are strippped as of 0.44. With that,

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Greg V (2017-12-31 08:55:24)
> 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 at 0@@1@@2@'.format(_llvm_version[0], _llvm_version[1], _llvm_patch),
> -- 
> 2.15.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180105/1df12ab8/attachment.sig>


More information about the mesa-dev mailing list