Compilation and Installation Using Meson
========================================
-- `Introduction <#intro>`__
-- `Basic Usage <#basic>`__
-- `Advanced Usage <#advanced>`__
-- `Cross-compilation and 32-bit builds <#cross-compilation>`__
-
-.. _intro:
-
1. Introduction
---------------
**Mesa's Meson build system is generally considered stable and ready for
production.**
-**Mesa requires Meson >= 0.52.0 to build.**
+.. note::
+
+ Mesa requires Meson >= 0.52.0 to build.
+
+ If your distribution doesn't have something recent enough in its
+ repositories, you can `try the methods suggested here
+ <https://mesonbuild.com/Getting-meson.html>`__ to install the
+ current version of Meson.
The Meson build of Mesa is tested on Linux, macOS, Windows, Cygwin,
Haiku, FreeBSD, DragonflyBSD, NetBSD, and should work on OpenBSD.
You may need to add the python3 scripts directory to your path for
meson.
-.. _basic:
-
2. Basic Usage
--------------
ninja -C build/ install
-.. note::
-
- autotools automatically updated translation files (used by the DRI
- configuration tool) as part of the build process, Meson does not do
- this. Instead, you will need do this:
-
- .. code-block:: console
-
- ninja -C build/ xmlpool-pot xmlpool-update-po xmlpool-gmo
-
Windows specific instructions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
want to use ICL or clang-cl with the vsbackend you will need meson
0.52.0 or greater. Older versions always use the microsoft compiler.
-.. _advanced:
-
3. Advanced Usage
-----------------
Meson supports the common CFLAGS, CXXFLAGS, etc. environment variables
but their use is discouraged because of the many caveats in using them.
-Instead, it is recomended to use ``-D${lang}_args`` and
+Instead, it is recommended to use ``-D${lang}_args`` and
``-D${lang}_link_args``. Among the benefits of these options is that
they are guaranteed to persist across rebuilds and reconfigurations.
meson builddir/ --cross-file cross-llvm.ini
-See the `Cross Compilation <#cross-compilation>`__ section for more
+See the :ref:`Cross Compilation <cross-compilation>` section for more
information.
On windows (and in other cases), using llvm-config or cmake may be
It may also define:
- ``irbuilder_h``: a ``files()`` object pointing to llvm/IR/IRBuilder.h
- (this is requred for SWR)
+ (this is required for SWR)
- ``has_rtti``: a ``bool`` that declares whether LLVM was built with
RTTI. Defaults to true