forked from KomodoPlatform/komodo-defi-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.i686-linux-android
45 lines (41 loc) · 1.27 KB
/
Dockerfile.i686-linux-android
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
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 x86 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_I686_LINUX_ANDROID_LINKER=i686-linux-android-clang \
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER="qemu-i386 -cpu n270" \
CC_i686_linux_android=i686-linux-android-clang \
CXX_i686_linux_android=i686-linux-android-clang++ \
DEP_Z_INCLUDE=/android-ndk/sysroot/usr/include/ \
LIBZ_SYS_STATIC=1 \
RUST_TEST_THREADS=1 \
HOME=/tmp/ \
TMPDIR=/tmp/ \
ANDROID_DATA=/ \
ANDROID_DNS_MODE=local \
ANDROID_ROOT=/system