Lines Matching +full:gcc +full:- +full:i686 +full:- +full:linux +full:- +full:gnu
5 ---------------
19 <https://mesonbuild.com/Getting-meson.html>`__ to install the
22 The Meson build of Mesa is tested on Linux, macOS, Windows, Cygwin,
25 Unix-like OSes
31 .. code-block:: console
33 sudo apt-get install meson # Ubuntu
37 .. code-block:: console
44 You'll also need `Ninja <https://ninja-build.org/>`__. If it's not
45 already installed, use apt-get or dnf to install the *ninja-build*
53 modules (Mako). You also need pkg-config (a hard dependency of Meson),
57 .. code-block:: console
64 .. code-block:: console
70 .. code-block:: console
72 py -3 -m pip install meson mako
78 --------------
82 latter must be enabled via the ``--backend`` switch, as Ninja is the
85 Meson only supports out-of-tree builds, and must be passed a directory
88 directory <https://mesonbuild.com/Using-multiple-build-directories.html>`__
93 .. code-block:: console
103 .. code-block:: console
109 now, we have a ``bin/meson-options.py`` script that prints the options
112 `meson_options.txt <https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson_options.txt>`__
117 to this command are in the form ``-D "option"="value"``. For example:
119 .. code-block:: console
121 meson configure build/ -Dprefix=/tmp/install -Dglx=true
124 complicated <https://mesonbuild.com/Build-options.html#using-build-options>`__,
126 separate values (``-D platforms=drm,wayland``) and brackets to represent
127 an empty list (``-D platforms=[]``).
132 .. code-block:: console
134 ninja -C build/
140 .. code-block:: console
142 ninja -C build/ install
150 clang-cl, or ICL (the Intel Compiler), read on.
153 Meson with these it to open a shell. For clang-cl you will need to open
155 file <https://mesonbuild.com/Native-environments.html>`__, or with the
160 ``--backend=vs`` to Meson will generate a Visual Studio solution.
163 -----------------
172 than the system library directory. This can be done with the --prefix
175 .. code-block:: console
177 meson --prefix="${PWD}/build/install" build/
191 Instead, it is recommended to use ``-D${lang}_args`` and
192 ``-D${lang}_link_args``. Among the benefits of these options is that
195 This example sets -fmax-errors for compiling C sources and -DMAGIC=123
198 .. code-block:: console
200 meson builddir/ -Dc_args=-fmax-errors=10 -Dcpp_args=-DMAGIC=123
213 .. code-block:: console
215 CC=clang CXX=clang++ meson build-clang
216 ninja -C build-clang
217 ninja -C build-clang clean
218 meson configure build -Dc_args="-Wno-typedef-redefinition"
219 ninja -C build-clang
223 `here <https://mesonbuild.com/Reference-tables.html#compiler-ids>`__.
228 Meson includes upstream logic to wrap llvm-config using its standard
233 :file:`libllvm.so`. There is also a ``-Dcmake_module_path`` option,
237 .. code-block:: console
239 meson builddir -Dcmake_module_path=/home/user/mycmake/prefix
242 file" <https://mesonbuild.com/Native-environments.html>`__, these files
245 to find llvm-config:
247 .. code-block:: ini
248 :caption: custom-llvm.ini
251 llvm-config = '/usr/local/bin/llvm/llvm-config'
255 .. code-block:: console
257 meson builddir/ --native-file custom-llvm.ini
259 For selecting llvm-config for cross compiling a `"cross
260 file" <https://mesonbuild.com/Cross-compilation.html#defining-the-environment>`__
263 .. code-block:: ini
264 :caption: cross-llvm.ini
268 llvm-config = '/usr/lib/llvm-config-32'
269 cmake = '/usr/bin/cmake-for-my-arch'
271 Obviously, only cmake or llvm-config is required.
275 .. code-block:: console
277 meson builddir/ --cross-file cross-llvm.ini
279 See the :ref:`Cross Compilation <cross-compilation>` section for more
282 On Windows (and in other cases), using llvm-config or CMake may be
284 `wrap <https://mesonbuild.com/Wrap-dependency-system-manual.html>`__, in
287 - Install the binaries and headers into the
289 - Add a :file:`meson.build` file to that directory (more on that later)
293 - ``dep_llvm``: a ``declare_dependency()`` object with
298 - ``irbuilder_h``: a ``files()`` object pointing to llvm/IR/IRBuilder.h
299 - ``has_rtti``: a ``bool`` that declares whether LLVM was built with
351 The ``pkg-config`` utility is a hard requirement for configuring and
352 building Mesa on Unix-like systems. It is used to search for external
354 the search path for ``pkg-config``. For instance, setting
363 passed as --option=foo to ``meson``, but -Doption=foo to
365 -Doption=foo.
369 ``--buildtype/-Dbuildtype``
374 setting it to ``release`` will yield non-optimal performance and
383 ``-Db_ndebug``
389 .. _cross-compilation:
391 4. Cross-compilation and 32-bit builds
392 --------------------------------------
395 cross-compilation <https://mesonbuild.com/Cross-compilation.html>`__ by
397 this file to ``meson`` or ``meson configure`` with the ``--cross-file``
407 Those running on ArchLinux can use the AUR-maintained packages for some
410 - `meson-cross-x86-linux-gnu <https://aur.archlinux.org/packages/meson-cross-x86-linux-gnu>`__
411 - `meson-cross-aarch64-linux-gnu <https://aur.archlinux.org/packages/meson-cross-aarch64-linux-gnu…
413 32-bit build on x86 linux:
415 .. code-block:: ini
418 c = '/usr/bin/gcc'
420 ar = '/usr/bin/gcc-ar'
422 pkgconfig = '/usr/bin/pkg-config-32'
423 llvm-config = '/usr/bin/llvm-config32'
426 c_args = ['-m32']
427 c_link_args = ['-m32']
428 cpp_args = ['-m32']
429 cpp_link_args = ['-m32']
432 system = 'linux'
434 cpu = 'i686'
437 64-bit build on ARM linux:
439 .. code-block:: ini
442 c = '/usr/bin/aarch64-linux-gnu-gcc'
443 cpp = '/usr/bin/aarch64-linux-gnu-g++'
444 ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'
445 strip = '/usr/bin/aarch64-linux-gnu-strip'
446 pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'
447 exe_wrapper = '/usr/bin/qemu-aarch64-static'
450 system = 'linux'
455 64-bit build on x86 Windows:
457 .. code-block:: ini
460 c = '/usr/bin/x86_64-w64-mingw32-gcc'
461 cpp = '/usr/bin/x86_64-w64-mingw32-g++'
462 ar = '/usr/bin/x86_64-w64-mingw32-ar'
463 strip = '/usr/bin/x86_64-w64-mingw32-strip'
464 pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
470 cpu = 'i686'