[Mesa-dev] Experiment: Compiling Mesa with Meson

Jussi Pakkanen jpakkane at gmail.com
Sun Jul 27 14:01:28 PDT 2014


Hi

I'm working on a new build system called Meson and as part of development I
try to convert build systems of existing projects into Meson to see that it
fullfillls the requirements of real processes. I did a trial conversion of
Mesa because it seemed like an interesting challenge as it has lots of code
generation and other unorthodox stuff.

Attached is a patch that compiles most of Mesa with Meson. It does not do
all drivers and there are probably other things missing as well. Here's how
it stacks up against the Scons compile:

build time (not directly comparable, as Meson compiles less code)

Scons: 1m 13s
Meson: 40s

no-op build time

Scons: 4.7s
Meson: 0.04s

If someone wants to try it out themselves, first they need to get the
latest Meson from trunk (the version in Debian is too old) and Ninja from
distro packages (usually called ninja-build):

https://github.com/jpakkane/meson

Then apply the attached patch to trunk (it's originally on top of
commit 74e100affc0ac1). Then cd into source root and do the following

mkdir buildmeson
cd buildmeson
path/to/meson.py ..
ninja

If it dies halfway through just run ninja again. This is a dependency bug,
which I'll try to get fixed soon.

This was a fun challenge, hope some of you find it interesting,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140728/65c00714/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Meson-compilation-experiment.patch
Type: text/x-patch
Size: 39083 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140728/65c00714/attachment-0001.bin>


More information about the mesa-dev mailing list