]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile
Rollup merge of #74872 - JohnTitor:ping-risc-v, r=Mark-Simulacrum
[rust.git] / src / ci / docker / host-x86_64 / disabled / dist-i686-android / Dockerfile
1 FROM ubuntu:16.04
2
3 COPY scripts/android-base-apt-get.sh /scripts/
4 RUN sh /scripts/android-base-apt-get.sh
5
6 COPY scripts/android-ndk.sh /scripts/
7 RUN . /scripts/android-ndk.sh && \
8     download_ndk android-ndk-r15c-linux-x86_64.zip && \
9     make_standalone_toolchain x86 14 && \
10     make_standalone_toolchain x86 21 && \
11     remove_ndk
12
13 RUN chmod 777 /android/ndk && \
14     ln -s /android/ndk/x86-21 /android/ndk/x86
15
16 ENV PATH=$PATH:/android/ndk/x86-14/bin
17
18 ENV DEP_Z_ROOT=/android/ndk/x86-14/sysroot/usr/
19
20 ENV HOSTS=i686-linux-android
21
22 ENV RUST_CONFIGURE_ARGS \
23       --i686-linux-android-ndk=/android/ndk/x86 \
24       --disable-rpath \
25       --enable-extended \
26       --enable-cargo-openssl-static
27
28 # We support api level 14, but api level 21 is required to build llvm. To
29 # overcome this problem we use a ndk with api level 21 to build llvm and then
30 # switch to a ndk with api level 14 to complete the build. When the linker is
31 # invoked there are missing symbols (like sigsetempty, not available with api
32 # level 14), the default linker behavior is to generate an error, to allow the
33 # build to finish we use --warn-unresolved-symbols. Note that the missing
34 # symbols does not affect std, only the compiler (llvm) and cargo (openssl).
35 ENV SCRIPT \
36   python3 ../x.py --stage 2 build src/llvm --host $HOSTS --target $HOSTS && \
37   (export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \
38     rm /android/ndk/x86 && \
39     ln -s /android/ndk/x86-14 /android/ndk/x86 && \
40     python3 ../x.py dist --host $HOSTS --target $HOSTS)
41
42 COPY scripts/sccache.sh /scripts/
43 RUN sh /scripts/sccache.sh