ci/android: Switch to using the Android NDK.

To support Android drivers, we're going to want to be tracking that Mesa's
build succeeds on a real android toolchain.  This still uses the android
stubs since these libs aren't in the NDK.

Note that I had to drop the Intel and AMD drivers currently: we don't have
LLVM cross-compiled for Android in this container, and I'm honestly hoping
ACO saves us from that.  Intel has dependencies on libexpat, which AOSP
really doesn't want to bring in, and it looks to me like those dependencies
could be optional.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23f03e4..d123d0e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -309,6 +309,20 @@
   needs:
     - s390x_build
 
+# Android NDK cross-build image
+android_build:
+  extends:
+    - .use-x86_build-base
+  variables:
+    FDO_DISTRIBUTION_TAG: &android_build "2020-10-05-shrink"
+
+.use-android_build:
+  variables:
+    TAG: *android_build
+  image: "$CI_REGISTRY_IMAGE/debian/android_build:$TAG"
+  needs:
+    - android_build
+
 # Debian 10 based x86 test image base
 x86_test-base:
   extends: x86_build-base
@@ -662,7 +676,9 @@
       -D werror=true
 
 meson-android:
-  extends: .meson-build
+  extends:
+    - .meson-cross
+    - .use-android_build
   variables:
     UNWIND: "disabled"
     DRI_LOADERS: >
@@ -670,11 +686,9 @@
       -D gbm=disabled
       -D egl=enabled
       -D platforms=android
-    GALLIUM_DRIVERS: freedreno
-    VULKAN_DRIVERS: freedreno,intel,amd
     EXTRA_OPTION: >
       -D android-stub=true
-      -D werror=true
+      -D llvm=disabled
     GALLIUM_ST: >
       -D dri3=disabled
       -D gallium-vdpau=disabled
@@ -684,6 +698,15 @@
       -D gallium-xa=disabled
       -D gallium-nine=false
       -D gallium-opencl=disabled
+    LLVM_VERSION: ""
+  script:
+    # arm64 build: Can't build v3d/vc4 because they require expat for v3d_decode.
+    - PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost VULKAN_DRIVERS=freedreno .gitlab-ci/meson-build.sh
+    # x86_64 build:
+    # Can't do Intel because gen_decoder.c currently requires libexpat, which
+    # is not a dependency that AOSP wants to accept.  Can't do Radeon because
+    # it requires LLVM, which we don't have an Android build of.
+    # - PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=intel .gitlab-ci/meson-build.sh
 
 .meson-cross:
   extends: