docs: meson -> Meson
Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
This commit is contained in:
parent
0835ee9e8d
commit
e198fb64e1
|
@ -8,7 +8,7 @@ with debugging. If ``MESA_DEBUG`` is defined, a message will be printed
|
|||
to stdout whenever an error occurs.
|
||||
|
||||
More extensive error checking is done in DEBUG builds
|
||||
(``--buildtype debug`` for meson, ``build=debug`` for scons).
|
||||
(``--buildtype debug`` for Meson, ``build=debug`` for scons).
|
||||
|
||||
In your debugger you can set a breakpoint in ``_mesa_error()`` to trap
|
||||
Mesa errors.
|
||||
|
|
|
@ -16,7 +16,7 @@ Compiling and Installing
|
|||
Build system
|
||||
^^^^^^^^^^^^
|
||||
|
||||
- `meson <https://mesonbuild.com>`__ is required when building on \*nix
|
||||
- `Meson <https://mesonbuild.com>`__ is required when building on \*nix
|
||||
platforms and is supported on windows.
|
||||
- `SCons <http://www.scons.org/>`__ is an alternative for building on
|
||||
Windows and Linux.
|
||||
|
|
|
@ -38,7 +38,7 @@ or
|
|||
|
||||
sudo dnf install meson # Fedora
|
||||
|
||||
Some older versions of meson do not check that they are too old and will
|
||||
Some older versions of Meson do not check that they are too old and will
|
||||
error out in odd ways.
|
||||
|
||||
You'll also need `Ninja <https://ninja-build.org/>`__. If it's not
|
||||
|
@ -48,9 +48,9 @@ package.
|
|||
Windows
|
||||
^^^^^^^
|
||||
|
||||
You will need to install python3 and meson as a module using pip. This
|
||||
You will need to install python3 and Meson as a module using pip. This
|
||||
is because we use python for generating code, and rely on external
|
||||
modules (mako). You also need pkg-config (a hard dependency of meson),
|
||||
modules (mako). You also need pkg-config (a hard dependency of Meson),
|
||||
flex, and bison. The easiest way to install everything you need is with
|
||||
`chocolatey <https://chocolatey.org/>`__.
|
||||
|
||||
|
@ -65,19 +65,19 @@ used with MSVC as well)
|
|||
|
||||
choco install ninja mingw
|
||||
|
||||
Then install meson using pip
|
||||
Then install Meson using pip
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
py -3 -m pip install meson mako
|
||||
|
||||
You may need to add the python3 scripts directory to your path for
|
||||
meson.
|
||||
Meson.
|
||||
|
||||
2. Basic Usage
|
||||
--------------
|
||||
|
||||
The meson program is used to configure the source directory and
|
||||
The Meson program is used to configure the source directory and
|
||||
generates either a ninja build file or Visual Studio® build files. The
|
||||
latter must be enabled via the ``--backend`` switch, as ninja is the
|
||||
default backend on all operating systems.
|
||||
|
@ -150,15 +150,15 @@ any shell and follow the instructions above. If you want to you MSVC,
|
|||
clang-cl, or ICL (the Intel Compiler), read on.
|
||||
|
||||
Both ICL and MSVC come with shell environments, the easiest way to use
|
||||
meson with these it to open a shell. For clang-cl you will need to open
|
||||
Meson with these it to open a shell. For clang-cl you will need to open
|
||||
an MSVC shell, and then override the compilers, either using a `native
|
||||
file <https://mesonbuild.com/Native-environments.html>`__, or with the
|
||||
CC and CXX environment variables.
|
||||
|
||||
All of these compilers are tested and work with ninja, but if you want
|
||||
visual studio integration or you just like msbuild, passing
|
||||
``--backend=vs`` to meson will generate a visual studio solution. If you
|
||||
want to use ICL or clang-cl with the vsbackend you will need meson
|
||||
``--backend=vs`` to Meson will generate a visual studio solution. If you
|
||||
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.
|
||||
|
||||
3. Advanced Usage
|
||||
|
@ -230,18 +230,18 @@ LLVM
|
|||
Meson includes upstream logic to wrap llvm-config using its standard
|
||||
dependency interface.
|
||||
|
||||
As of meson 0.51.0 meson can use cmake to find LLVM (the cmake finder
|
||||
was added in meson 0.49.0, but LLVM cannot be found until 0.51) Due to
|
||||
As of Meson 0.51.0 Meson can use cmake to find LLVM (the cmake finder
|
||||
was added in Meson 0.49.0, but LLVM cannot be found until 0.51) Due to
|
||||
the way LLVM implements its cmake finder it will only find static
|
||||
libraries, it will never find libllvm.so. There is also a
|
||||
``-Dcmake_module_path`` option in this meson version, which points to
|
||||
``-Dcmake_module_path`` option in this Meson version, which points to
|
||||
the root of an alternative installation (the prefix). For example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
meson builddir -Dcmake_module_path=/home/user/mycmake/prefix
|
||||
|
||||
As of meson 0.49.0 meson also has the concept of a `"native
|
||||
As of Meson 0.49.0 Meson also has the concept of a `"native
|
||||
file" <https://mesonbuild.com/Native-environments.html>`__, these files
|
||||
provide information about the native build environment (as opposed to a
|
||||
cross build environment). They are ini formatted and can override where
|
||||
|
@ -254,7 +254,7 @@ custom-llvm.ini
|
|||
[binaries]
|
||||
llvm-config = '/usr/local/bin/llvm/llvm-config'
|
||||
|
||||
Then configure meson:
|
||||
Then configure Meson:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
@ -284,7 +284,7 @@ cross-llvm.ini
|
|||
|
||||
Obviously, only cmake or llvm-config is required.
|
||||
|
||||
Then configure meson:
|
||||
Then configure Meson:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
@ -373,7 +373,7 @@ metadata in ``/usr/X11R6`` before the standard directories.
|
|||
Options
|
||||
^^^^^^^
|
||||
|
||||
One of the oddities of meson is that some options are different when
|
||||
One of the oddities of Meson is that some options are different when
|
||||
passed to the ``meson`` than to ``meson configure``. These options are
|
||||
passed as --option=foo to ``meson``, but -Doption=foo to
|
||||
``meson configure``. Mesa defined options are always passed as
|
||||
|
@ -385,18 +385,18 @@ For those coming from autotools be aware of the following:
|
|||
This option will set the compiler debug/optimisation levels to aid
|
||||
debugging the Mesa libraries.
|
||||
|
||||
Note that in meson this defaults to ``debugoptimized``, and not
|
||||
Note that in Meson this defaults to ``debugoptimized``, and not
|
||||
setting it to ``release`` will yield non-optimal performance and
|
||||
binary size. Not using ``debug`` may interfere with debugging as some
|
||||
code and validation will be optimized away.
|
||||
|
||||
For those wishing to pass their own optimization flags, use the
|
||||
``plain`` buildtype, which causes meson to inject no additional
|
||||
``plain`` buildtype, which causes Meson to inject no additional
|
||||
compiler arguments, only those in the C/CXXFLAGS and those that mesa
|
||||
itself defines.
|
||||
|
||||
``-Db_ndebug``
|
||||
This option controls assertions in meson projects. When set to
|
||||
This option controls assertions in Meson projects. When set to
|
||||
``false`` (the default) assertions are enabled, when set to true they
|
||||
are disabled. This is unrelated to the ``buildtype``; setting the
|
||||
latter to ``release`` will not turn off assertions.
|
||||
|
|
Loading…
Reference in New Issue