]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/disabled/dist-armv7-android/Dockerfile
New upstream version 1.20.0+dfsg1
[rustc.git] / src / ci / docker / disabled / dist-armv7-android / Dockerfile
CommitLineData
7cac9316
XL
1FROM ubuntu:16.04
2
041b39d2
XL
3COPY scripts/android-base-apt-get.sh /scripts/
4RUN sh /scripts/android-base-apt-get.sh
7cac9316 5
7cac9316
XL
6COPY scripts/dumb-init.sh /scripts/
7RUN sh /scripts/dumb-init.sh
8
7cac9316
XL
9COPY scripts/android-ndk.sh /scripts/
10RUN . /scripts/android-ndk.sh && \
11 download_ndk android-ndk-r13b-linux-x86_64.zip && \
12 make_standalone_toolchain arm 9 && \
13 make_standalone_toolchain arm 21 && \
14 remove_ndk
15
16RUN chmod 777 /android/ndk && \
17 ln -s /android/ndk/arm-21 /android/ndk/arm
18
7cac9316
XL
19ENV PATH=$PATH:/android/ndk/arm-9/bin
20
21ENV DEP_Z_ROOT=/android/ndk/arm-9/sysroot/usr/
22
23ENV HOSTS=armv7-linux-androideabi
24
25ENV RUST_CONFIGURE_ARGS \
26 --host=$HOSTS \
27 --target=$HOSTS \
28 --armv7-linux-androideabi-ndk=/android/ndk/arm \
29 --disable-rpath \
30 --enable-extended \
31 --enable-cargo-openssl-static
32
33# We support api level 9, but api level 21 is required to build llvm. To
34# overcome this problem we use a ndk with api level 21 to build llvm and then
35# switch to a ndk with api level 9 to complete the build. When the linker is
36# invoked there are missing symbols (like sigsetempty, not available with api
37# level 9), the default linker behavior is to generate an error, to allow the
38# build to finish we use --warn-unresolved-symbols. Note that the missing
39# symbols does not affect std, only the compiler (llvm) and cargo (openssl).
40ENV SCRIPT \
41 python2.7 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \
42 (export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \
43 rm /android/ndk/arm && \
44 ln -s /android/ndk/arm-9 /android/ndk/arm && \
45 python2.7 ../x.py dist --host $HOSTS --target $HOSTS)
46
7cac9316
XL
47COPY scripts/sccache.sh /scripts/
48RUN sh /scripts/sccache.sh
49
7cac9316 50ENTRYPOINT ["/usr/bin/dumb-init", "--"]