forked from KomodoPlatform/komodo-defi-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.armv7-linux-androideabi
47 lines (44 loc) · 1.4 KB
/
Dockerfile.armv7-linux-androideabi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
gcc \
libc6-dev \
make \
pkg-config \
git \
automake \
libtool \
m4 \
autoconf \
make \
file \
binutils \
# Clang is needed in order for the Rust bindgen to work.
# cf. https://github.com/rust-embedded/cross/issues/174
# Clang will be installed in android-ndk.sh, make sure this line is necessary.
llvm-3.9-dev libclang-3.9-dev clang-3.9 \
libc6-dev-i386 && \
apt-get clean
COPY android-ndk.sh /
RUN bash /android-ndk.sh arm 21
ENV PATH=$PATH:/android-ndk/bin
ENV RUSTFMT=rustfmt
# Libz is distributed in the android ndk, but for some unknown reason it is not
# found in the build process of some crates, so we explicit set the DEP_Z_ROOT
ENV CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang \
CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_RUNNER=qemu-arm \
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang \
CXX_armv7_linux_androideabi=armv7a-linux-androideabi21-clang++ \
DEP_Z_INCLUDE=/android-ndk/sysroot/usr/include/ \
OPENSSL_STATIC=1 \
OPENSSL_DIR=/openssl \
OPENSSL_INCLUDE_DIR=/openssl/include \
OPENSSL_LIB_DIR=/openssl/lib \
RUST_TEST_THREADS=1 \
HOME=/tmp/ \
TMPDIR=/tmp/ \
ANDROID_DATA=/ \
ANDROID_DNS_MODE=local \
ANDROID_ROOT=/system