Developers Explore Meson Build System For Wayland / Weston
Written by Michael Larabel in Wayland on 29 November 2016 at 01:40 PM EST. 21 Comments
WAYLAND --
A growing number of GNOME projects have been exploring Meson as a next-gen build system with one of the benefits being much faster build times. Now Daniel Stone at Collabora is exploring using Meson for Wayland and its Weston Weston compositor.

Daniel Stone sent out the early patches for supporting the Meson build system in Weston and Wayland. He cited among the benefits, "There are a few things which attracted me to Meson. It's really, mindblowingly, fast. There's no artificial split between configure and build stages (i.e. configure.ac vs. Makefile.am). Its dependencies are quite lightweight. It has first-class support for pkg-config, and I've not had a problem with executables, shared libraries, modules, static helper libraries, binaries to install to libexec, tests, etc etc...Meson's the first one I've found that strikes the right balance (not perfect, but within striking distance) of lightweight DSL vs. useful programming language. And, it's really incredibly fast. It has far better support for cross-compilation and sysroots than autotools can ever hope to have. And it's got quite a good upstream community behind it, and solid documentation."

But he did note that it's not yet the perfect build system, "There are also some inefficiencies: currently, for some reason, Meson will run wayland-scanner once for every generated file _for every target_. So xdg-shell-unstable-v5-client-protocol.h, for example, gets built a bazillion times. Fixing that upstream would actually visibly cut the build times. We could also get a speed boost by moving away from config.h and using per-target build flags, to avoid unnecessary rebuilds: this doesn't work with autotools as it only rebuilds if dependent mtimes change, but Meson/Ninja hash the build flags and force a rebuild if those change. I'm going to be looking into that later."

Even with the current inefficiencies, the results with Meson are incredible. Building Wayland/Weston on smaller platforms is between three and six times faster while on larger platforms is still two to four times faster than Autotools. The footprint is also smaller at 374 lines versus 481 lines.

More details on this proposal of switching to the Meson build system via this RFC patch series. Those wanting to find out the latest on this promising open-source build system can visit MesonBuild.com.

About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Wayland News
Popular News This Week