Re: [Mesa-dev] [PATCH 11/18] travis: meson: use native files to override llvm-config

2018-12-14 Thread Dylan Baker
Quoting Emil Velikov (2018-12-13 08:06:00)
> From: Dylan Baker 
> 
> This is the supported way to do this, and should be more robust and
> reliable.
> 
> v2: [Emil]
>  - enable backslash escapes
>  - don't hardcode the path
>  - pass the argument directly to meson
> 
> Reviewed-by: Emil Velikov  (v1)
> Signed-off-by: Emil Velikov 
> ---
>  .travis.yml | 22 +-
>  1 file changed, 5 insertions(+), 17 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index c69f322d7b3..c398ebc748a 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -650,28 +650,16 @@ script:
>  MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} 
> -Dgallium-drivers=${GALLIUM_DRIVERS:-[]} 
> -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
>fi
>  
> -  # Travis CI has moved to LLVM 5.0, and meson is detecting
> -  # automatically the available version in /usr/local/bin based on
> -  # the PATH env variable order preference.
> +  # We need to control the version of llvm-config we're using, so we'll
> +  # generate a native file to do so. This requires meson >=0.49
>#
> -  # As for 0.44.x, Meson cannot receive the path to the
> -  # llvm-config binary as a configuration parameter. See
> -  # https://github.com/mesonbuild/meson/issues/2887 and
> -  # 
> https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
> -  #
> -  # We want to use the custom (APT) installed version. Therefore,
> -  # let's make Meson find our wanted version sooner than the one
> -  # at /usr/local/bin
> -  #
> -  # Once this is corrected, we would still need a patch similar
> -  # to:
> -  # 
> https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
> -  test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG 
> $HOME/prefix/bin/llvm-config
> +  echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > 
> native.file
>  
>$LLVM_CONFIG --version
>  
>export CFLAGS="$CFLAGS -isystem`pwd`"
> -  meson _build $MESON_OPTIONS
> +  meson _build $MESON_OPTIONS \
> +   --native-file=native.file
>meson configure _build
>ninja -C _build
>  fi
> -- 
> 2.19.2
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

I feel weird reviewing my own patch, but for your changes:
Reviewed-by: Dylan Baker 


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 11/18] travis: meson: use native files to override llvm-config

2018-12-13 Thread Emil Velikov
From: Dylan Baker 

This is the supported way to do this, and should be more robust and
reliable.

v2: [Emil]
 - enable backslash escapes
 - don't hardcode the path
 - pass the argument directly to meson

Reviewed-by: Emil Velikov  (v1)
Signed-off-by: Emil Velikov 
---
 .travis.yml | 22 +-
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index c69f322d7b3..c398ebc748a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -650,28 +650,16 @@ script:
 MESON_OPTIONS="-Ddri-drivers=${DRI_DRIVERS:-[]} 
-Dgallium-drivers=${GALLIUM_DRIVERS:-[]} -Dvulkan-drivers=${VULKAN_DRIVERS:-[]}"
   fi
 
-  # Travis CI has moved to LLVM 5.0, and meson is detecting
-  # automatically the available version in /usr/local/bin based on
-  # the PATH env variable order preference.
+  # We need to control the version of llvm-config we're using, so we'll
+  # generate a native file to do so. This requires meson >=0.49
   #
-  # As for 0.44.x, Meson cannot receive the path to the
-  # llvm-config binary as a configuration parameter. See
-  # https://github.com/mesonbuild/meson/issues/2887 and
-  # 
https://github.com/dcbaker/meson/commit/7c8b6ee3fa42f43c9ac7dcacc61a77eca3f1bcef
-  #
-  # We want to use the custom (APT) installed version. Therefore,
-  # let's make Meson find our wanted version sooner than the one
-  # at /usr/local/bin
-  #
-  # Once this is corrected, we would still need a patch similar
-  # to:
-  # 
https://lists.freedesktop.org/archives/mesa-dev/2017-December/180217.html
-  test -f /usr/bin/$LLVM_CONFIG && ln -s /usr/bin/$LLVM_CONFIG 
$HOME/prefix/bin/llvm-config
+  echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
 
   $LLVM_CONFIG --version
 
   export CFLAGS="$CFLAGS -isystem`pwd`"
-  meson _build $MESON_OPTIONS
+  meson _build $MESON_OPTIONS \
+   --native-file=native.file
   meson configure _build
   ninja -C _build
 fi
-- 
2.19.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev