From e198fb64e10ed6753d2f38657a96eaf4fec7578e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 29 Sep 2020 18:20:24 +0200 Subject: [PATCH] docs: meson -> Meson Reviewed-by: Eric Engestrom Part-of: --- docs/debugging.rst | 2 +- docs/install.rst | 2 +- docs/meson.rst | 38 +++++++++++++++++++------------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/debugging.rst b/docs/debugging.rst index 1e90c52a9cf..d59465aae6a 100644 --- a/docs/debugging.rst +++ b/docs/debugging.rst @@ -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. diff --git a/docs/install.rst b/docs/install.rst index 3355002a4bc..0ea14b79fbf 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -16,7 +16,7 @@ Compiling and Installing Build system ^^^^^^^^^^^^ -- `meson `__ is required when building on \*nix +- `Meson `__ is required when building on \*nix platforms and is supported on windows. - `SCons `__ is an alternative for building on Windows and Linux. diff --git a/docs/meson.rst b/docs/meson.rst index 340287a0a8c..8868af78ec4 100644 --- a/docs/meson.rst +++ b/docs/meson.rst @@ -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 `__. 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 `__. @@ -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 `__, 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" `__, 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.