[Mesa-dev] [PATCH 2/2] travis: make Meson find the proper llvm-config
Gert Wollny
gw.fossdev at gmail.com
Wed Feb 28 17:53:49 UTC 2018
Am Mittwoch, den 28.02.2018, 17:52 +0200 schrieb Andres Gomez:
> 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.
>
> 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/7c8b6ee3fa42f43c9ac7dcacc61a7
> 7eca3f1bcef
>
> 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
>
> Cc: Eric Engestrom <eric.engestrom at imgtec.com>
> Cc: Dylan Baker <dylan at pnwbakers.com>
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Cc: Juan A. Suarez Romero <jasuarez at igalia.com>
> Cc: Gert Wollny <gw.fossdev at gmail.com>
> Cc: Jon Turney <jon.turney at dronecode.org.uk>
> Signed-off-by: Andres Gomez <agomez at igalia.com>
> ---
> .travis.yml | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 0ec08e5bff7..5081bfc5d28 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -573,8 +573,28 @@ script:
> scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
> fi
>
> - - if test "x$BUILD" = xmeson; then
> - export CFLAGS="$CFLAGS -isystem`pwd`";
> - meson _build $MESON_OPTIONS;
> - ninja -C _build;
> + - |
> + if test "x$BUILD" = xmeson; then
> +
> + # 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.
> + #
> + # 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/7c8b6ee3fa42f43c9ac7
> dcacc61a77eca3f1bcef
> + #
> + # 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-Decembe
> r/180217.html
> + test -f /usr/bin/llvm-config && ln -s /usr/bin/llvm-config
> $HOME/prefix/bin
I'm not sure how the toolchain packages on travis are created and maybe
what I'm writing here is irrelevant, but at least on Debian llvm-config
is provided by the package llvm that depends on llvm-X.Y with some
version X.Y and it is a symlink to the corresponding llvm-config-X.Y
file. Which version X.Y that actually is depends on what the
maintainers of llvm decide to be the current default version. In
current Debian/sid this is llvm-4.0.
Hence, to be sure to get the desired version X,Y of llvm I'd install
the according llvm-X.Y package, set LLVM_CONFIG like it is already done
for the make builds and then do:
test -f /usr/bin/${LLVM_CONFIG} && \
ln -s /usr/bin/${LLVM_CONFIG} $HOME/prefix/bin/llvm-config
>
> + export CFLAGS="$CFLAGS -isystem`pwd`"
> + meson _build $MESON_OPTIONS
> + ninja -C _build
> fi
More information about the mesa-dev
mailing list