[Mesa-dev] [PATCH] travis: use LLVM 5.0 for Meson Vulkan

Eric Engestrom eric.engestrom at imgtec.com
Fri Dec 15 16:49:44 UTC 2017


On Friday, 2017-12-15 17:17:55 +0100, Juan A. Suarez Romero wrote:
> Travis CI has moved to LLVM 5.0, and meson is detecting automatically
> the available version.
> 
> So just let's change to LLVM 5.0 for this case.

I thought we were using 3.9 on purpose, to test our minimum required
llvm version?

I think the proper fix would be to add a `-D llvm-version=3.9` option
and use that in the dependency() check.

Untested patch follows; Dylan, what do you think?

----8<----
diff --git a/meson.build b/meson.build
index 6e5ae4d24e9e55b1b2d3..e990eb9717b36f1b4b8a 100644
--- a/meson.build
+++ b/meson.build
@@ -972,14 +972,18 @@ if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
 endif
 
 _llvm = get_option('llvm')
+_llvm_version = get_option('llvm-version')
+if _llvm_version == 'auto'
+  _llvm_version = '>= 3.9.0'
+endif
 if _llvm == 'auto'
   dep_llvm = dependency(
-    'llvm', version : '>= 3.9.0', modules : llvm_modules,
+    'llvm', version : _llvm_version, modules : llvm_modules,
     required : with_amd_vk or with_gallium_radeonsi,
   )
   with_llvm = dep_llvm.found()
 elif _llvm == 'true'
-  dep_llvm = dependency('llvm', version : '>= 3.9.0', modules : llvm_modules)
+  dep_llvm = dependency('llvm', version : _llvm_version, modules : llvm_modules)
   with_llvm = true
 else
   dep_llvm = []
diff --git a/meson_options.txt b/meson_options.txt
index 39b137cbeafb82a4f845..e72988755c2d1c8401f9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -208,6 +208,12 @@ option(
   choices : ['auto', 'true', 'false'],
   description : 'Build with LLVM support.'
 )
+option(
+  'llvm-version',
+  type : 'string',
+  value : 'auto',
+  description : 'LLVM version to use, or `auto`'
+)
 option(
   'valgrind',
   type : 'combo',
diff --git a/.travis.yml b/.travis.yml
index 211df3ec1efe47aa4092..e054a6c5210e755a2c68 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ matrix:
     - env:
         - LABEL="meson Vulkan"
         - BUILD=meson
-        - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
+        - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers= -Dllvm-version=3.9"
       addons:
         apt:
           sources:
---->8----

> ---
>  .travis.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 211df3ec1ef..20432361176 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -37,12 +37,12 @@ matrix:
>        addons:
>          apt:
>            sources:
> -            - llvm-toolchain-trusty-3.9
> +            - llvm-toolchain-trusty-5.0
>            packages:
>              # LLVM packaging is broken and misses these dependencies
>              - libedit-dev
>              # From sources above
> -            - llvm-3.9-dev
> +            - llvm-5.0-dev
>              # Common
>              - xz-utils
>              - libexpat1-dev
> -- 
> 2.14.3
> 


More information about the mesa-dev mailing list