chore(docs): rusticl: improve list of build dependencies
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 17 Sep 2022 09:53:26 +0000 (11:53 +0200)
committerKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 17 Sep 2022 13:20:37 +0000 (15:20 +0200)
v2:
 - added more requirements for LLVM (thanks Mike Lothian (@FireBurn)).
v3:
 - note the optional cases for rustfmt (thanks @LingMan)
 - remove the part about the SPIR-V target for LLVM (thanks Karol Herbst
   (@karolherbst))
v4:
 - added minimum version requirements (thanks Karol Herbst
   (@karolherbst))

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18640>

docs/rusticl.rst

index 2530624..c162f81 100644 (file)
@@ -1,10 +1,29 @@
 Rusticl
 =======
 
-The easiest way to build Rusticl is by either installing ``rustc``,
-``rustfmt`` and ``bindgen`` from your distribution or to simply use
-rustup. Just make sure that the ``rustfmt`` and ``bindgen`` components
-are installed. Then simply add ``-Dgallium-rusticl=true -Dllvm=enabled
+To build Rusticl you need to satisfy the following build dependencies:
+
+-  ``rustc``
+-  ``rustfmt`` (highly recommended, but only *required* for CI builds
+   or when authoring patches)
+-  ``bindgen``
+-  `LLVM <https://github.com/llvm/llvm-project/>`__ built with
+   ``libclc`` and ``-DLLVM_ENABLE_DUMP=ON``.
+-  `SPIRV-Tools <https://github.com/KhronosGroup/SPIRV-Tools>`__
+-  `SPIRV-LLVM-Translator
+   <https://github.com/KhronosGroup/SPIRV-LLVM-Translator>`__ for a
+   ``libLLVMSPIRVLib.so`` matching your version of LLVM, ie. if you're
+   using LLVM 15 (``libLLVM.so.15``), then you need a
+   ``libLLVMSPIRVLib.so.15``.
+
+The minimum versions to build Rusticl are:
+
+-  Rust: 1.59
+-  Meson: 0.61.4
+-  LLVM: 11.0.0 (recommended: 15.0.0)
+-  SPIRV-Tools: any version (recommended: v2022.3)
+
+Afterwards you only need to add ``-Dgallium-rusticl=true -Dllvm=enabled
 -Drust_std=2021`` to your build options.
 
 Most of the code related to Mesa's C code lives inside ``/mesa``, with