Re: [PATCH xserver] meson: Don't use '' in link_with, ever

2017-10-24 Thread Adam Jackson
On Tue, 2017-10-24 at 12:19 +0100, Jon Turney wrote:
> On 23/10/2017 21:21, Lyude Paul wrote:
> 
> > Signed-off-by: Lyude Paul 
> 
> Reviewed-by: Jon Turney 

remote: I: patch #184369 updated using rev 
4d53e30651c0fe5f7be38ae8529fa49846d39549.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   5893e72a20..4d53e30651  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] meson: Don't use '' in link_with, ever

2017-10-24 Thread Jon Turney

On 23/10/2017 21:21, Lyude Paul wrote:

String arguments as elements in the array passed to the link_with
argument in meson's executable() functions are not valid and will end up
causing the build file generation to file. This actually ended up
exposing a bug in meson that caused it not to report where in the
meson.build file it was failing:

https://github.com/mesonbuild/meson/pull/2527

The proper way to have a variable that can contain either an empty link
target or an actual link target is:

some_target = []
if some_cond
 some_target = static_library(...)
endif

This way if some_cond is False, some_target gets set to [], gets passed
to executable() in the link_with array, and then gets removed by array
flattening.

This also unbreaks Xwayland builds with -Dglx=false, the thing that
originally made me notice this.

Signed-off-by: Lyude Paul 
---
  glx/meson.build| 2 +-
  hw/dmx/meson.build | 2 +-
  meson.build| 4 ++--
  3 files changed, 4 insertions(+), 4 deletions(-)


Reviewed-by: Jon Turney 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel