[Mesa-dev] [PATCH v3 08/48] meson: fix dl detection on non cygwin windows

Eric Engestrom eric.engestrom at intel.com
Fri Aug 10 08:38:15 UTC 2018


On Thursday, 2018-08-09 10:32:35 -0700, Dylan Baker wrote:
> Quoting Eric Engestrom (2018-08-09 08:36:55)
> > On Monday, 2018-08-06 17:50:48 -0700, Dylan Baker wrote:
> > > ---
> > >  meson.build | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/meson.build b/meson.build
> > > index c7dd5ddfec6..788021c05e9 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -1027,9 +1027,9 @@ endif
> > >  if cc.has_function('dlopen')
> > 
> > This check is not needed on windows, is it? It will always fail afaict.
> > 
> > How about this?
> >   if host == windows or cc.has_function(dlopen)
> > 
> > >    dep_dl = null_dep
> > >  else
> > > -  dep_dl = cc.find_library('dl')
> > > +  dep_dl = cc.find_library('dl', required : host_machine.system() != 'windows')
> > >  endif
> > > -if cc.has_function('dladdr', dependencies : dep_dl)
> > > +if host_machine.system() != 'windows' and cc.has_function('dladdr', dependencies : dep_dl)
> > >    # This is really only required for megadrivers
> > >    pre_args += '-DHAVE_DLADDR'
> > >  endif
> 
> How about:
> # check for dl support
> dep_dl = null_dep
> if host_machine.system() != 'windows'
>   if not cc.has_function('dlopen')
>     dep_dl = cc.find_library('dl')
>   endif
>   if cc.has_function('dladdr', dependencies : dep_dl)
>     # This is really only required for megadrivers
>     pre_args += '-DHAVE_DLADDR'
>   endif
> endif

Even better :)
Consider it r-b

> 
> > 
> > With that, 1-4 and 7-8 are:
> > Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
> > 
> > > -- 
> > > 2.18.0
> > > 
> > > _______________________________________________
> > > mesa-dev mailing list
> > > mesa-dev at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list