[Mesa-dev] [PATCH] docs: add documentation for building with meson

Eric Engestrom eric at engestrom.ch
Wed Oct 18 22:49:36 UTC 2017


On Wednesday, 2017-10-18 22:08:04 +0000, Dylan Baker wrote:
> Quoting Eric Engestrom (2017-10-18 14:48:49)
> > On Wednesday, 2017-10-18 18:45:19 +0000, Nicholas Miell wrote:
> > > On 10/17/2017 12:21 PM, Dylan Baker wrote:
> > > > +<p>
> > > > +To see a description of your options you can run "meson configure". This will
> > > > +show your meson project configuration options as well as your local
> > > > +configuration options. One meson option to be aware of is that meson's default
> > > > +build type is "debug" (-O0 -g on gcc/clang).
> > > > +</p>
> > > > +
> > > > +<pre>
> > > > +    meson configure build
> > > > +</pre>
> > > > +
> > > 
> > > There should probably be a warning here about how there's no way to export a
> > > build configuration and how every minor or point update of meson requires
> > > you to delete your build directories and reconfigure everything from
> > > scratch.
> > 
> > Agreed, the delete & reconfigure thing is really annoying, I'm hoping
> > this will be fixed eventually :/
> > 
> > As for exporting the config, I'm actually working on this area of
> > meson's code right now, it would be quite easy for me to add a 'dump'
> > feature.
> > I'm guessing something like autotool's `./config.status --config` that
> > can just be fed back to the next run of `meson` would be good?
> > 
> > I haven't actually yet figured out if I can only print the options that
> > don't have their default value, so what I can do for now is a trivial
> > 'dump all the current values'. Would that be interesting to you?
> 
> I don't think that the meson IR has an concept of default values for options,
> the interpreter just passes the default value as the value if one isn't given. I

Yeah, that's the impression I got, but I hadn't dug enough to be sure.
I really want to have a 'reset to default value' in my TUI though, so
I just might have to add that concept to meson :P

> do think this is a nice feature, and I was thinking about doing it myself, once
> the 0.43.1 release happens and upstream starts pulling feature requests again.
> One though I had was just to save the command line options in a text file so you
> could do something like:
> 
>     meson build-1.0 `cat build-0.9/options.txt`

Not a bad idea! I'll add an optional `outfile` param to `--dump` :)

I have the dump feature basically working in my branch [1] btw, I'll make a nice
clean patch series out of it and submit a pull request when the TUI is
usable.

[1] https://github.com/1ace/meson/tree/feature/mesonconf-tui

> 
> Dylan


More information about the mesa-dev mailing list