Lines Matching +full:gcc +full:- +full:i686 +full:- +full:linux +full:- +full:gnu
5 ---------------
16 <https://mesonbuild.com/Getting-meson.html>`__ to install the
19 The Meson build of Mesa is tested on Linux, macOS, Windows, Cygwin,
22 Unix-like OSes
28 .. code-block:: sh
30 sudo apt-get install meson # Ubuntu
34 .. code-block:: sh
41 You'll also need `Ninja <https://ninja-build.org/>`__. If it's not
42 already installed, use apt-get or dnf to install the *ninja-build*
48 …cies you would need to install on linux to build and install mesa main. You can install these pack…
49 On Debian, Ubuntu and similar, ``sudo apt-get build-dep mesa`` installs
54 All these dependencies are for latest linux distros and is tested on ubuntu-24 only for now.
58 … the full content of the packages, so make sure to also install ``-dev``/``-devel``/``-headers``/e…
60 1. glslang-tools
61 2. python3-pyyaml
62 3. python3-mako
64 5. libclc-<version>
65 6. llvm-<version>
66 7. libllvmspirvlib-<version>
67 8. libclang-<version>
72 …You should make sure that all the llvm related packages (libclc, libclc-dev, llvm, libllvmspirvlib…
77 2. libwayland-egl-backend
84 4. libxcb-glx
85 5. libxcb-shm
86 6. libx11-xcb
87 7. libxcb-dri2
88 8. libxcb-dri3
89 9. libxcb-present
94 for intel vulkan ray-tracing:
96 1. python3-ply
114 modules (Mako). You also need pkg-config (a hard dependency of Meson),
118 .. code-block:: sh
125 .. code-block:: sh
131 .. code-block:: sh
133 py -3 -m pip install meson packaging mako
139 --------------
143 latter must be enabled via the ``--backend`` switch, as Ninja is the
146 Meson only supports out-of-tree builds, and must be passed a directory
149 directory <https://mesonbuild.com/Using-multiple-build-directories.html>`__
154 .. code-block:: sh
165 .. code-block:: sh
172 `meson_options.txt <https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson_options.txt>`__
177 to this command are in the form ``-D "option"="value"``. For example:
179 .. code-block:: sh
181 meson configure build/ -Dprefix=/tmp/install -Dglx=true
184 complicated <https://mesonbuild.com/Build-options.html#using-build-options>`__,
186 separate values (``-D platforms=drm,wayland``) and brackets to represent
187 an empty list (``-D platforms=[]``).
192 .. code-block:: sh
194 ninja -C build/
200 .. code-block:: sh
202 ninja -C build/ install
206 .. code-block:: sh
214 .. code-block:: sh
224 clang-cl, or ICL (the Intel Compiler), read on.
227 Meson with these it to open a shell. For clang-cl you will need to open
229 file <https://mesonbuild.com/Native-environments.html>`__, or with the
234 ``--backend=vs`` to Meson will generate a Visual Studio solution.
237 -----------------
246 than the system library directory. This can be done with the --prefix
249 .. code-block:: sh
251 meson --prefix="${PWD}/build/install" build/
265 Instead, it is recommended to use ``-D${lang}_args`` and
266 ``-D${lang}_link_args``. Among the benefits of these options is that
269 This example sets -fmax-errors for compiling C sources and -DMAGIC=123
272 .. code-block:: sh
274 meson setup builddir/ -Dc_args=-fmax-errors=10 -Dcpp_args=-DMAGIC=123
287 .. code-block:: sh
289 CC=clang CXX=clang++ meson setup build-clang
290 ninja -C build-clang
291 ninja -C build-clang clean
292 meson configure build -Dc_args="-Wno-typedef-redefinition"
293 ninja -C build-clang
297 `here <https://mesonbuild.com/Reference-tables.html#compiler-ids>`__.
302 Meson includes upstream logic to wrap llvm-config using its standard
307 :file:`libllvm.so`. There is also a ``-Dcmake_module_path`` option,
311 .. code-block:: sh
313 meson setup builddir -Dcmake_module_path=/home/user/mycmake/prefix
316 file" <https://mesonbuild.com/Native-environments.html>`__, these files
319 to find llvm-config:
321 .. code-block:: ini
322 :caption: custom-llvm.ini
325 llvm-config = '/usr/local/bin/llvm/llvm-config'
329 .. code-block:: sh
331 meson setup builddir/ --native-file custom-llvm.ini
333 For selecting llvm-config for cross compiling a `"cross
334 file" <https://mesonbuild.com/Cross-compilation.html#defining-the-environment>`__
337 .. code-block:: ini
338 :caption: cross-llvm.ini
342 llvm-config = '/usr/lib/llvm-config-32'
343 cmake = '/usr/bin/cmake-for-my-arch'
345 Obviously, only CMake or llvm-config is required.
349 .. code-block:: sh
351 meson setup builddir/ --cross-file cross-llvm.ini
353 See the :ref:`Cross Compilation <cross-compilation>` section for more
356 On Windows (and in other cases), using llvm-config or CMake may be
358 `wrap <https://mesonbuild.com/Wrap-dependency-system-manual.html>`__, in
361 - Install the binaries and headers into the
363 - Add a :file:`meson.build` file to that directory (more on that later)
367 - ``dep_llvm``: a ``declare_dependency()`` object with
372 - ``irbuilder_h``: a ``files()`` object pointing to llvm/IR/IRBuilder.h
373 - ``has_rtti``: a ``bool`` that declares whether LLVM was built with
425 The ``pkg-config`` utility is a hard requirement for configuring and
426 building Mesa on Unix-like systems. It is used to search for external
428 the search path for ``pkg-config``. For instance, setting
437 passed as --option=foo to :program:`meson`, but -Doption=foo to
439 -Doption=foo.
443 ``--buildtype/-Dbuildtype``
448 setting it to ``release`` will yield non-optimal performance and
457 ``-Db_ndebug``
463 .. _cross-compilation:
465 4. Cross-compilation and 32-bit builds
466 --------------------------------------
469 cross-compilation <https://mesonbuild.com/Cross-compilation.html>`__ by
471 this file to ``meson`` or ``meson configure`` with the ``--cross-file``
481 Those running on Arch Linux can use the AUR-maintained packages for some
484 - `meson-cross-x86-linux-gnu <https://aur.archlinux.org/packages/meson-cross-x86-linux-gnu>`__
485 - `meson-cross-aarch64-linux-gnu <https://github.com/dcbaker/archlinux-meson-cross-aarch64-linux-g…
487 Cross-compilation requires cross-compiled versions of the same build
490 On Debian, Ubuntu and similar, the command ``sudo apt-rdepends
491 --build-depends --follow=DEPENDS mesa`` provides a complete and
492 up-to-date list of all build dependencies. Append the ``:i386`` suffix
494 need like this: ``sudo apt install libwayland-dev:i386 libelf-dev:i386
497 On Fedora and similar, try ``sudo setarch i686 dnf builddep mesa``. If
503 You do not need a cross-compiled version of the dependencies like
507 depending on how you configure your ``meson setup ...`` command - this
508 is not specific to cross-compilation; see details above. So you may want
509 to proceed with trial-and-error and install only cross-compiled packages
512 32-bit build on x86 linux:
514 .. code-block:: ini
517 c = '/usr/bin/gcc'
520 # To accelerate cross-compilation as much as native compilation:
521 # c = ['ccache', 'gcc']
523 ar = '/usr/bin/gcc-ar'
525 llvm-config = '/usr/bin/llvm-config32'
526 pkg-config = '/usr/bin/pkg-config-32'
528 # pkg-config instead, like the ARM and Windows examples below:
529 # pkg-config = 'i686-redhat-linux-gnu-pkg-config'
531 [built-in options]
532 c_args = ['-m32']
533 c_link_args = ['-m32']
534 cpp_args = ['-m32']
535 cpp_link_args = ['-m32']
538 system = 'linux'
540 cpu = 'i686'
543 64-bit build on ARM linux:
545 .. code-block:: ini
548 c = '/usr/bin/aarch64-linux-gnu-gcc'
549 cpp = '/usr/bin/aarch64-linux-gnu-g++'
550 ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'
551 strip = '/usr/bin/aarch64-linux-gnu-strip'
552 pkg-config = '/usr/bin/aarch64-linux-gnu-pkg-config'
553 exe_wrapper = '/usr/bin/qemu-aarch64-static'
556 system = 'linux'
561 64-bit build on x86 Windows:
563 .. code-block:: ini
566 c = '/usr/bin/x86_64-w64-mingw32-gcc'
567 cpp = '/usr/bin/x86_64-w64-mingw32-g++'
568 ar = '/usr/bin/x86_64-w64-mingw32-ar'
569 strip = '/usr/bin/x86_64-w64-mingw32-strip'
570 pkg-config = '/usr/bin/x86_64-w64-mingw32-pkg-config'
576 cpu = 'i686'