From 18d7162951adaad33202be64e739417607895434 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Fri, 1 Aug 2025 18:38:51 -0700 Subject: [PATCH] docs/android: add docs for preparing offline compilers Part-of: --- docs/android.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/android.rst b/docs/android.rst index bee7c948aab..500383a3e3d 100644 --- a/docs/android.rst +++ b/docs/android.rst @@ -15,6 +15,29 @@ When building llvmpipe or lavapipe for Android the ndk-build workflow is also used, but there are additional steps required to add the driver to the Android OS image. +Preparing offline compilers +--------------------------- + +For cross-compiling the nvk driver, mesa_clc compiler binary needs to be +prepared first: + +.. code-block:: sh + + meson setup build-compiler \ + -Dprefix=/tmp/mesa-compiler \ + -Dbuildtype=release \ + -Dstrip=true \ + -Dplatforms= \ + -Dgallium-drivers= \ + -Dvulkan-drivers= \ + -Dmesa-clc=enabled \ + -Dinstall-mesa-clc=true + meson install -C build-compiler + export PATH=/tmp/mesa-compiler/bin:$PATH + +For panvk, ``-Dtools=panfrost -Dinstall-precomp-compiler=true`` is +additionally needed. + Building using the Android NDK ------------------------------