[tbb-commits] [tor-browser-build/master] Bug 27439: Add android target for rust compiler

gk at torproject.org gk at torproject.org
Fri Oct 26 06:23:21 UTC 2018


commit 61cdddfa4b7daf96f6bd1a52fb25a3ec055cc401
Author: sisbell <shane.isbell at gmail.com>
Date:   Tue Sep 4 09:42:09 2018 -0700

    Bug 27439: Add android target for rust compiler
---
 projects/rust/build  |  2 +-
 projects/rust/config | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/projects/rust/build b/projects/rust/build
index 61a5d50..5f421c7 100644
--- a/projects/rust/build
+++ b/projects/rust/build
@@ -6,7 +6,7 @@ mkdir -p /var/tmp/dist
 tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
 export PATH="/var/tmp/dist/cmake/bin:$PATH"
 tar -C /var/tmp/dist -xf [% c('input_files_by_name/prev_rust') %]
-cd /var/tmp/dist/rust-[% c('var/prev_version') %]-[% c('arch') %]-unknown-linux-gnu
+cd /var/tmp/dist/rust-[% c('var/prev_version') %]-[% c('var/rust_arch') %]-unknown-linux-gnu
 ./install.sh --prefix=$distdir-rust-old
 export PATH="$distdir-rust-old/bin:$PATH"
 
diff --git a/projects/rust/config b/projects/rust/config
index b5547f9..d3f9c40 100644
--- a/projects/rust/config
+++ b/projects/rust/config
@@ -3,10 +3,20 @@ filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/buil
 version: 1.26.1
 var:
   prev_version: 1.25.0
+  rust_arch: '[% c("arch") %]'
   container:
     use_container: 1
 
 targets:
+  android-armv7:
+    var:
+      rust_arch: x86_64
+      arch_deps:
+        - libssl-dev
+        - pkg-config
+        - zlib1g-dev
+      configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=armv7-linux-androideabi --set=target.armv7-linux-androideabi.ar=$ANDROID_NDK_HOME/arm/bin/arm-linux-androideabi-ar --set=target.armv7-linux-androideabi.linker=$ANDROID_NDK_HOME/arm/bin/arm-linux-androideabi-clang --set=target.armv7-linux-androideabi.cc=$ANDROID_NDK_HOME/arm/bin/arm-linux-androideabi-gcc
+
   linux:
     var:
       arch_deps:
@@ -66,7 +76,7 @@ input_files:
     sig_ext: asc
     file_gpg_id: 1
     gpg_keyring: rust.gpg
-  - URL: 'https://static.rust-lang.org/dist/rust-[% c("var/prev_version") %]-[% c("arch") %]-unknown-linux-gnu.tar.xz'
+  - URL: 'https://static.rust-lang.org/dist/rust-[% c("var/prev_version") %]-[% c("var/rust_arch") %]-unknown-linux-gnu.tar.xz'
     name: prev_rust
     sig_ext: asc
     file_gpg_id: 1



More information about the tbb-commits mailing list