[Mesa-dev] [PATCH 1/2] meson: do not search for needless deps

Eric Engestrom eric.engestrom at imgtec.com
Tue Oct 31 11:04:49 UTC 2017


On Tuesday, 2017-10-31 11:37:25 +0100, Erik Faye-Lund wrote:
> On Tue, Oct 31, 2017 at 11:24 AM, Eric Engestrom
> <eric.engestrom at imgtec.com> wrote:
> > On Tuesday, 2017-10-31 08:29:28 +0100, Erik Faye-Lund wrote:
> >> If we don't want to use these deps, there's no good reason to search
> >> for them in the first place. This should shave a bit of time for the
> >> initial build.
> >>
> >> Signed-off-by: Erik Faye-Lund <kusmabite at gmail.com>
> >> ---
> >>  meson.build       | 20 ++++++++++++++------
> >>  meson_options.txt | 14 ++++++++------
> >>  2 files changed, 22 insertions(+), 12 deletions(-)
> >>
> >> diff --git a/meson.build b/meson.build
> >> index 24d997b3e0..24019e7460 100644
> >> --- a/meson.build
> >> +++ b/meson.build
> >> @@ -691,9 +691,13 @@ if with_glvnd
> >>  endif
> >>
> >>  # TODO: make this conditional
> >> -dep_valgrind = dependency('valgrind', required : false)
> >> -if dep_valgrind.found() and with_valgrind
> >> -  pre_args += '-DHAVE_VALGRIND'
> >> +if with_valgrind != 'no'
> >> +  dep_valgrind = dependency('valgrind', required : with_valgrind == 'yes')
> >> +  if dep_valgrind.found()
> >> +    pre_args += '-DHAVE_VALGRIND'
> >> +  endif
> >> +else
> >> +  dep_valgrind = []
> >>  endif
> >>
> >>  # pthread stubs. Lets not and say we didn't
> >> @@ -709,9 +713,13 @@ endif
> >>
> >>  # TODO: llvm-prefix and llvm-shared-libs
> >>
> >> -dep_unwind = dependency('libunwind', required : false)
> >> -if dep_unwind.found() and with_libunwind
> >> -  pre_args += '-DHAVE_LIBUNWIND'
> >> +if with_libunwind != 'no'
> >> +  dep_unwind = dependency('libunwind', required : with_libunwind == 'yes')
> >> +  if dep_unwind.found()
> >> +    pre_args += '-DHAVE_LIBUNWIND'
> >> +  endif
> >> +else
> >> +  dep_unwind = []
> >>  endif
> >>
> >>  # TODO: flags for opengl, gles, dri
> >> diff --git a/meson_options.txt b/meson_options.txt
> >> index 74f1e71bf4..e4a20bfad4 100644
> >> --- a/meson_options.txt
> >> +++ b/meson_options.txt
> >> @@ -138,15 +138,17 @@ option(
> >>  )
> >>  option(
> >>    'valgrind',
> >> -  type : 'boolean',
> >> -  value : true,
> >> -  description : 'Build with valgrind support if possible'
> >> +  type : 'combo',
> >> +  value : 'auto',
> >> +  choices : ['auto', 'yes', 'no'],
> >> +  description : 'Build with valgrind support'
> >>  )
> >>  option(
> >>    'libunwind',
> >> -  type : 'boolean',
> >> -  value : true,
> >> -  description : 'Use libunwind for stack-traces if possible'
> >> +  type : 'combo',
> >> +  value : 'auto',
> >> +  choices : ['auto', 'yes', 'no'],
> >
> > Please already makes these auto/true/false when introducing them :)
> > With that fixed, the second patch only contains stray hunks, and can be
> > dropped,
> 
> No, I also fix up the 'gbm', 'egl' and 'dri3' options in that patch,
> so it won't be stray hunks. The point was to keep everything in the
> same style. An alternative would be to fix up these three first, and
> *then* add, but that would make this patch depend on the outcome of
> that discussion.

Your changes to these 3 options in your second patch are partial
(missing meson_options.txt changes), and Dylan already send a complete
patch for those [1], so I just assumed you had applied his patch locally
and mistakenly added some of his changes.

[1] https://lists.freedesktop.org/archives/mesa-dev/2017-October/174793.html


More information about the mesa-dev mailing list