Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,884
    • Issues 2,884
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 906
    • Merge requests 906
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge requests
  • !4740

Merged
Created Apr 24, 2020 by Dylan Baker@dbakerDeveloper

Bump required meson to 0.52 and make use of new features

  • Overview 37
  • Commits 10
  • Pipelines 60
  • Changes 141

Meson 0.46 (our previously required version) is quite old at this point, and there are quite a few cases in our code of "if meson_version >= X". There's also a good deal of open coding things that meson has gained builtins for since then. Using these generally requires less code and means that the functionality is being tested upstream.

For the most part I don't think the changes here are going to be at all contentious.

After (and in part because of) mesa's "auto" options meson gained an upstream supported version called "features". These work somewhat like our "auto" options but are considerably more powerful. They can be passed directly into dependency() calls, and do fancy things like short circuit dependency to return not found if they're disabled. This means we can replace code like:

_opt = get_option('option')
if _opt != 'false'
  dep_opt = dependency('opt', required : _opt == 'true')
else
  dep_opt = dep_null
endif

with

dep_opt = dependency('opt', required : get_option('option')

and get the same behavior.

This also provides nice behavior for distros, as meson provides a switch (--auto-features) that can be used to force such features to on or off. This allow distros to be confident that there is no autodetection going on, and they have configured mesa exactly the way they want. It also means that mesa's build system looks more like everyone else's build system, which is a nice feature for everyone.

To get to that point, I've deprecated "true" and "false" while adding "enabled" and "disabled", so that in the future we can switch to those.

Edited May 26, 2020 by Dylan Baker
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: meson-0.52-updates