[Mesa-dev] [RFC] clover/meson: Ignore 'svn' suffix when computing CLANG_RESOURCE_DIR

Dylan Baker dylan at pnwbakers.com
Mon Jan 7 19:34:51 UTC 2019


Quoting Pierre Moreau (2019-01-06 05:06:04)
> The version exported by LLVM in its CMake configuration files can include
> the \u201csvn\u201d suffix when building a development version (for example
> \u201c8.0.0svn\u201d). However the exported clang headers are still found under
> \u201clib/clang/8.0.0/\u201d, without the \u201csvn\u201d suffix.
> This processing is already performed in \u201cconfigure.ac\u201d when using
> autotools.
> 
> Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> ---
> I am not that familiar with Meson yet and couldn\u2019t found a better way to
> extract the version numbers from the version string than splitting the
> version string on the \u2018s\u2019 character.
> 
>  src/gallium/state_trackers/clover/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/state_trackers/clover/meson.build b/src/gallium/state_trackers/clover/meson.build
> index a6729af2fb8..1985c7583fb 100644
> --- a/src/gallium/state_trackers/clover/meson.build
> +++ b/src/gallium/state_trackers/clover/meson.build
> @@ -53,7 +53,7 @@ libclllvm = static_library(
>      '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('libexecdir')),
>      '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
>        dep_llvm.get_configtool_variable('libdir'), 'clang',
> -      dep_llvm.get_configtool_variable('version'), 'include',
> +      dep_llvm.get_configtool_variable('version').split('s')[0], 'include',

I think you can just use dep_llvm.version() now, which does split the 'svn' or
'git' off the end already. When this was written it didn't do that.

>      )),
>    ],
>    dependencies : [dep_llvm, dep_elf],
> -- 
> 2.20.1
> 

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190107/34488a03/attachment.sig>


More information about the mesa-dev mailing list