For Linux, on a recent Debian based distribution do:
- ::
+ .. code-block:: console
aptitude install llvm-dev
For a RPM-based distribution do:
- ::
+ .. code-block:: console
yum install llvm-devel
to be built with a matching CRT as Mesa, and you'll need to pass
``-DLLVM_USE_CRT_xxx=yyy`` as described below.
- LLVM build-type
+
+ +-----------------+----------------------------------------------------------------+
+ | LLVM build-type | Mesa build-type |
+ | +--------------------------------+-------------------------------+
+ | | debug,checked | release,profile |
+ +=================+================================+===============================+
+ | Debug | ``-DLLVM_USE_CRT_DEBUG=MTd`` | ``-DLLVM_USE_CRT_DEBUG=MT`` |
+ +-----------------+--------------------------------+-------------------------------+
+ | Release | ``-DLLVM_USE_CRT_RELEASE=MTd`` | ``-DLLVM_USE_CRT_RELEASE=MT`` |
+ +-----------------+--------------------------------+-------------------------------+
+
+ You can build only the x86 target by passing
+ ``-DLLVM_TARGETS_TO_BUILD=X86`` to cmake.
- scons (optional)
To build everything on Linux invoke scons as:
-::
+.. code-block:: console
scons build=debug libgl-xlib
Alternatively, you can build it with meson with:
-::
+.. code-block:: console
mkdir build
cd build
but the rest of these instructions assume that scons is used. For
Windows the procedure is similar except the target:
-::
+.. code-block:: console
scons platform=windows build=debug libgl-gdi