Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-03-01 Thread Emil Velikov
On 1 March 2018 at 18:15, Dylan Baker  wrote:
> Quoting Emil Velikov (2018-03-01 09:27:44)
>> On 1 March 2018 at 17:16, Dylan Baker  wrote:
>> > Quoting Emil Velikov (2018-02-28 16:01:56)
>> >> On 28 February 2018 at 21:18, Andres Gomez  wrote:
>> >> > 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/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
>> >> >
>> >> > v2: Create the link only to the specificly wanted LLVM version (Gert).
>> >> >
>> >> > Cc: Eric Engestrom 
>> >> > Cc: Dylan Baker 
>> >> > Cc: Emil Velikov 
>> >> > Cc: Juan A. Suarez Romero 
>> >> > Cc: Gert Wollny 
>> >> > Cc: Jon Turney 
>> >> > Signed-off-by: Andres Gomez 
>> >> > Reviewed-and-Tested-by: Eric Engestrom 
>> >> > Reviewed-by: Dylan Baker 
>> >> > Reviewed-by: Juan A. Suarez 
>> >> > ---
>> >> >  .travis.yml | 30 ++
>> >> >  1 file changed, 26 insertions(+), 4 deletions(-)
>> >> >
>> >> > diff --git a/.travis.yml b/.travis.yml
>> >> > index 0ec08e5bff7..823111ca539 100644
>> >> > --- a/.travis.yml
>> >> > +++ b/.travis.yml
>> >> > @@ -34,6 +34,8 @@ matrix:
>> >> >  - LABEL="meson Vulkan"
>> >> >  - BUILD=meson
>> >> >  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
>> >> > +- LLVM_VERSION=4.0
>> >> > +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>> >> >addons:
>> >> >  apt:
>> >> >sources:
>> >> > @@ -573,8 +575,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/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
>> >> > +
>> >> Patch looks good,
>> >> Reviewed-by: Emil Velikov 
>> >>
>> >> Aside:
>> >> I'm not quite sure we need Eric's llvm-version toggle.
>> >>
>> >> Haven't looked exactly what meson does now, but it seems like it
>> >> probes for specifics binaries/locations.
>> >> So having something like /opt/bin/llvm-config-host-4.0 won't cut it -
>> >> a sort of pattern fairly common when using OE/Yocto.
>> >>
>> >> Let's keep that for another time,
>> >> Emil
>> >
>> > Since I wrote that logic in meson,
>> >
>> > It tries (in order), llvm-config, llvm-config-7svn, ... Until it
>> > finds one that satisfies the version requirements passed. Which means if 
>> > there
>> > is no `llvm-config` it will pick llvm-config-5.0 before llvm-config-4.0. 
>> > I've
>> > proposed adding a meson level option to force a specific llvm-config to be 
>> > used
>> > but it's been ignored thus far.
>> >
>> I would skim through OE/Yocto/others and point it out to the meson people.
>> Here's one example from LibreELEC [1] which seems fairly common.
>>
>> -Emil
>>
>> [1] 
>> https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/lang/llvm/package.mk
>
> That's a little different because they're potentially doing a cross compile.
> Meson already allows you to specify an llvm-config in a cross file, just not 
> for
> native builds. I think everyone agrees it's a good idea, but no one can agree 
> on
> what color to pain the bike shed.
>
That makes sense, thanks.

Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-03-01 Thread Dylan Baker
Quoting Emil Velikov (2018-03-01 09:27:44)
> On 1 March 2018 at 17:16, Dylan Baker  wrote:
> > Quoting Emil Velikov (2018-02-28 16:01:56)
> >> On 28 February 2018 at 21:18, Andres Gomez  wrote:
> >> > 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/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
> >> >
> >> > v2: Create the link only to the specificly wanted LLVM version (Gert).
> >> >
> >> > Cc: Eric Engestrom 
> >> > Cc: Dylan Baker 
> >> > Cc: Emil Velikov 
> >> > Cc: Juan A. Suarez Romero 
> >> > Cc: Gert Wollny 
> >> > Cc: Jon Turney 
> >> > Signed-off-by: Andres Gomez 
> >> > Reviewed-and-Tested-by: Eric Engestrom 
> >> > Reviewed-by: Dylan Baker 
> >> > Reviewed-by: Juan A. Suarez 
> >> > ---
> >> >  .travis.yml | 30 ++
> >> >  1 file changed, 26 insertions(+), 4 deletions(-)
> >> >
> >> > diff --git a/.travis.yml b/.travis.yml
> >> > index 0ec08e5bff7..823111ca539 100644
> >> > --- a/.travis.yml
> >> > +++ b/.travis.yml
> >> > @@ -34,6 +34,8 @@ matrix:
> >> >  - LABEL="meson Vulkan"
> >> >  - BUILD=meson
> >> >  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> >> > +- LLVM_VERSION=4.0
> >> > +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
> >> >addons:
> >> >  apt:
> >> >sources:
> >> > @@ -573,8 +575,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/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
> >> > +
> >> Patch looks good,
> >> Reviewed-by: Emil Velikov 
> >>
> >> Aside:
> >> I'm not quite sure we need Eric's llvm-version toggle.
> >>
> >> Haven't looked exactly what meson does now, but it seems like it
> >> probes for specifics binaries/locations.
> >> So having something like /opt/bin/llvm-config-host-4.0 won't cut it -
> >> a sort of pattern fairly common when using OE/Yocto.
> >>
> >> Let's keep that for another time,
> >> Emil
> >
> > Since I wrote that logic in meson,
> >
> > It tries (in order), llvm-config, llvm-config-7svn, ... Until it
> > finds one that satisfies the version requirements passed. Which means if 
> > there
> > is no `llvm-config` it will pick llvm-config-5.0 before llvm-config-4.0. 
> > I've
> > proposed adding a meson level option to force a specific llvm-config to be 
> > used
> > but it's been ignored thus far.
> >
> I would skim through OE/Yocto/others and point it out to the meson people.
> Here's one example from LibreELEC [1] which seems fairly common.
> 
> -Emil
> 
> [1] 
> https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/lang/llvm/package.mk

That's a little different because they're potentially doing a cross compile.
Meson already allows you to specify an llvm-config in a cross file, just not for
native builds. I think everyone agrees it's a good idea, but no one can agree on
what color to pain the bike shed.

Dylan


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

Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-03-01 Thread Emil Velikov
On 1 March 2018 at 17:16, Dylan Baker  wrote:
> Quoting Emil Velikov (2018-02-28 16:01:56)
>> On 28 February 2018 at 21:18, Andres Gomez  wrote:
>> > 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/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
>> >
>> > v2: Create the link only to the specificly wanted LLVM version (Gert).
>> >
>> > Cc: Eric Engestrom 
>> > Cc: Dylan Baker 
>> > Cc: Emil Velikov 
>> > Cc: Juan A. Suarez Romero 
>> > Cc: Gert Wollny 
>> > Cc: Jon Turney 
>> > Signed-off-by: Andres Gomez 
>> > Reviewed-and-Tested-by: Eric Engestrom 
>> > Reviewed-by: Dylan Baker 
>> > Reviewed-by: Juan A. Suarez 
>> > ---
>> >  .travis.yml | 30 ++
>> >  1 file changed, 26 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/.travis.yml b/.travis.yml
>> > index 0ec08e5bff7..823111ca539 100644
>> > --- a/.travis.yml
>> > +++ b/.travis.yml
>> > @@ -34,6 +34,8 @@ matrix:
>> >  - LABEL="meson Vulkan"
>> >  - BUILD=meson
>> >  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
>> > +- LLVM_VERSION=4.0
>> > +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>> >addons:
>> >  apt:
>> >sources:
>> > @@ -573,8 +575,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/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
>> > +
>> Patch looks good,
>> Reviewed-by: Emil Velikov 
>>
>> Aside:
>> I'm not quite sure we need Eric's llvm-version toggle.
>>
>> Haven't looked exactly what meson does now, but it seems like it
>> probes for specifics binaries/locations.
>> So having something like /opt/bin/llvm-config-host-4.0 won't cut it -
>> a sort of pattern fairly common when using OE/Yocto.
>>
>> Let's keep that for another time,
>> Emil
>
> Since I wrote that logic in meson,
>
> It tries (in order), llvm-config, llvm-config-7svn, ... Until it
> finds one that satisfies the version requirements passed. Which means if there
> is no `llvm-config` it will pick llvm-config-5.0 before llvm-config-4.0. I've
> proposed adding a meson level option to force a specific llvm-config to be 
> used
> but it's been ignored thus far.
>
I would skim through OE/Yocto/others and point it out to the meson people.
Here's one example from LibreELEC [1] which seems fairly common.

-Emil

[1] 
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/lang/llvm/package.mk
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-03-01 Thread Dylan Baker
Quoting Emil Velikov (2018-02-28 16:01:56)
> On 28 February 2018 at 21:18, Andres Gomez  wrote:
> > 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/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
> >
> > v2: Create the link only to the specificly wanted LLVM version (Gert).
> >
> > Cc: Eric Engestrom 
> > Cc: Dylan Baker 
> > Cc: Emil Velikov 
> > Cc: Juan A. Suarez Romero 
> > Cc: Gert Wollny 
> > Cc: Jon Turney 
> > Signed-off-by: Andres Gomez 
> > Reviewed-and-Tested-by: Eric Engestrom 
> > Reviewed-by: Dylan Baker 
> > Reviewed-by: Juan A. Suarez 
> > ---
> >  .travis.yml | 30 ++
> >  1 file changed, 26 insertions(+), 4 deletions(-)
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 0ec08e5bff7..823111ca539 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -34,6 +34,8 @@ matrix:
> >  - LABEL="meson Vulkan"
> >  - BUILD=meson
> >  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> > +- LLVM_VERSION=4.0
> > +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
> >addons:
> >  apt:
> >sources:
> > @@ -573,8 +575,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/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
> > +
> Patch looks good,
> Reviewed-by: Emil Velikov 
> 
> Aside:
> I'm not quite sure we need Eric's llvm-version toggle.
> 
> Haven't looked exactly what meson does now, but it seems like it
> probes for specifics binaries/locations.
> So having something like /opt/bin/llvm-config-host-4.0 won't cut it -
> a sort of pattern fairly common when using OE/Yocto.
> 
> Let's keep that for another time,
> Emil

Since I wrote that logic in meson,

It tries (in order), llvm-config, llvm-config-7svn, ... Until it
finds one that satisfies the version requirements passed. Which means if there
is no `llvm-config` it will pick llvm-config-5.0 before llvm-config-4.0. I've
proposed adding a meson level option to force a specific llvm-config to be used
but it's been ignored thus far.

Dylan


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


Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-02-28 Thread Emil Velikov
On 28 February 2018 at 21:18, Andres Gomez  wrote:
> 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/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
>
> v2: Create the link only to the specificly wanted LLVM version (Gert).
>
> Cc: Eric Engestrom 
> Cc: Dylan Baker 
> Cc: Emil Velikov 
> Cc: Juan A. Suarez Romero 
> Cc: Gert Wollny 
> Cc: Jon Turney 
> Signed-off-by: Andres Gomez 
> Reviewed-and-Tested-by: Eric Engestrom 
> Reviewed-by: Dylan Baker 
> Reviewed-by: Juan A. Suarez 
> ---
>  .travis.yml | 30 ++
>  1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 0ec08e5bff7..823111ca539 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -34,6 +34,8 @@ matrix:
>  - LABEL="meson Vulkan"
>  - BUILD=meson
>  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> +- LLVM_VERSION=4.0
> +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>addons:
>  apt:
>sources:
> @@ -573,8 +575,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/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
> +
Patch looks good,
Reviewed-by: Emil Velikov 

Aside:
I'm not quite sure we need Eric's llvm-version toggle.

Haven't looked exactly what meson does now, but it seems like it
probes for specifics binaries/locations.
So having something like /opt/bin/llvm-config-host-4.0 won't cut it -
a sort of pattern fairly common when using OE/Yocto.

Let's keep that for another time,
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-02-28 Thread Gert Wollny
Looks fine to me, 

Reviewed-By: Gert Wollny 

Am Mittwoch, den 28.02.2018, 23:18 +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
> 
> v2: Create the link only to the specificly wanted LLVM version
> (Gert).
> 
> Cc: Eric Engestrom 
> Cc: Dylan Baker 
> Cc: Emil Velikov 
> Cc: Juan A. Suarez Romero 
> Cc: Gert Wollny 
> Cc: Jon Turney 
> Signed-off-by: Andres Gomez 
> Reviewed-and-Tested-by: Eric Engestrom 
> Reviewed-by: Dylan Baker 
> Reviewed-by: Juan A. Suarez 
> ---
>  .travis.yml | 30 ++
>  1 file changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 0ec08e5bff7..823111ca539 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -34,6 +34,8 @@ matrix:
>  - LABEL="meson Vulkan"
>  - BUILD=meson
>  - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
> +- LLVM_VERSION=4.0
> +- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
>addons:
>  apt:
>sources:
> @@ -573,8 +575,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/llvm-config
> +
> +  export CFLAGS="$CFLAGS -isystem`pwd`"
> +  meson _build $MESON_OPTIONS
> +  ninja -C _build
>  fi
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2] travis: make Meson find the proper llvm-config

2018-02-28 Thread 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/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

v2: Create the link only to the specificly wanted LLVM version (Gert).

Cc: Eric Engestrom 
Cc: Dylan Baker 
Cc: Emil Velikov 
Cc: Juan A. Suarez Romero 
Cc: Gert Wollny 
Cc: Jon Turney 
Signed-off-by: Andres Gomez 
Reviewed-and-Tested-by: Eric Engestrom 
Reviewed-by: Dylan Baker 
Reviewed-by: Juan A. Suarez 
---
 .travis.yml | 30 ++
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 0ec08e5bff7..823111ca539 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,6 +34,8 @@ matrix:
 - LABEL="meson Vulkan"
 - BUILD=meson
 - MESON_OPTIONS="-Ddri-drivers= -Dgallium-drivers="
+- LLVM_VERSION=4.0
+- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
   addons:
 apt:
   sources:
@@ -573,8 +575,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/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
+
+  export CFLAGS="$CFLAGS -isystem`pwd`"
+  meson _build $MESON_OPTIONS
+  ninja -C _build
 fi
-- 
2.15.1

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