ci/android: add rust compiler to create-android-cross-file.sh
Add rust compiler definitions to the create-android-cross-file.sh file
to be able to cross-build drivers that use Rust code.
This is inspired by the changes in commit 2f5db959a7 ("docs/android:
update cross file and add nvk instructions", 2025-08-01)
Also add rust and bindgen to the debian/android_build container.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
This commit is contained in:
committed by
Marge Bot
parent
fbbb5d15f0
commit
3cd4cc7d07
@@ -22,6 +22,7 @@ cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_v
|
||||
c_ld = 'lld'
|
||||
cpp_ld = 'lld'
|
||||
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
|
||||
rust = ['rustc', '--target', '${arch2}']
|
||||
pkg-config = ['/usr/bin/pkgconf']
|
||||
|
||||
[host_machine]
|
||||
@@ -32,6 +33,7 @@ endian = 'little'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
bindgen_clang_arguments = ['-target', '${arch2}', '--sysroot', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot']
|
||||
pkg_config_libdir = '/usr/local/lib/${arch2}/pkgconfig/:/${ndk}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/${arch2}/pkgconfig/'
|
||||
|
||||
EOF
|
||||
|
||||
@@ -35,6 +35,13 @@ find /${ndk}/ -type f \( -iname '*clang-check*' -o -iname '*clang-tidy*' -o -ina
|
||||
|
||||
sh .gitlab-ci/container/create-android-ndk-pc.sh /$ndk zlib.pc "" "-lz" "1.2.3" $ANDROID_SDK_VERSION
|
||||
|
||||
# Install android Rust targets
|
||||
rustup target add \
|
||||
x86_64-linux-android \
|
||||
i686-linux-android \
|
||||
aarch64-linux-android \
|
||||
armv7-linux-androideabi
|
||||
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk x86_64-linux-android x86_64 x86_64 $ANDROID_SDK_VERSION
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x86 x86 $ANDROID_SDK_VERSION
|
||||
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android aarch64 armv8 $ANDROID_SDK_VERSION
|
||||
@@ -113,6 +120,8 @@ rm -rf $LIBELF_VERSION
|
||||
# to avoid rebuilding it in a future run if the version does not change.
|
||||
bash .gitlab-ci/container/build-android-x86_64-llvm.sh
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
apt-get purge -y "${EPHEMERAL[@]}"
|
||||
|
||||
. .gitlab-ci/container/container_post_build.sh
|
||||
|
||||
Reference in New Issue
Block a user