[Mesa-dev] Lets talk about autotools

Caio Marcelo de Oliveira Filho caio.oliveira at intel.com
Mon Sep 17 22:51:50 UTC 2018


> Quoting Marek Olšák (2018-09-17 14:25:36)
> > Where do I find default values for meson configure options?
> > 
> > Thanks,
> > Marek
> 
> The meson_options.txt file has the default options. A lot of them are
> unfortunately just "auto", which is the downside of having a single build system
> that supports Linux and other free Unix-like OSes, MacOS, haiku, and cygwin
> (hopefully windows soon?) 
> 
> We've discussed in upstream meson about having per-OS defaults in the
> meson_options.txt and no one seems to object but there are some technical
> problems to solve.

Dylan, in the mean time, would it make sense to add options that
expand on the valid meanings of auto?  Concrete example:

In meson_build, when we get the option gallium-drivers, if it is auto,
it will pick the value of gallium-drivers-PLAT, based on what platform
we are.

So information like:

    if ['x86', 'x86_64'].contains(host_machine.cpu_family())
      _drivers = [
        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast'
      ]
    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
      _drivers = [
        'pl111', 'v3d', 'vc4', 'freedreno', 'etnaviv', 'imx', 'nouveau',
        'tegra', 'virgl', 'swrast',
      ]

would be available as the default value for options
gallium-drivers-LINUX-X86, gallium-drivers-LINUX-X86-64,
gallium-drivers-LINUX-ARM, ... Maybe LINUX is not the right level to
split things up, but you get the idea.  The upside is those defaults
would be visible with 'meson configure'.

This is an abuse of meson, since those options gallium-drivers-PLAT
options are not meant to be set by the user.  


Thanks,
Caio


More information about the mesa-dev mailing list