]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/disabled/dist-i686-android/Dockerfile
New upstream version 1.45.0+dfsg1
[rustc.git] / src / ci / docker / disabled / dist-i686-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/android-ndk.sh /scripts/
7RUN . /scripts/android-ndk.sh && \
ea8adc8c
XL
8 download_ndk android-ndk-r15c-linux-x86_64.zip && \
9 make_standalone_toolchain x86 14 && \
7cac9316
XL
10 make_standalone_toolchain x86 21 && \
11 remove_ndk
12
13RUN chmod 777 /android/ndk && \
14 ln -s /android/ndk/x86-21 /android/ndk/x86
15
ea8adc8c 16ENV PATH=$PATH:/android/ndk/x86-14/bin
7cac9316 17
ea8adc8c 18ENV DEP_Z_ROOT=/android/ndk/x86-14/sysroot/usr/
7cac9316
XL
19
20ENV HOSTS=i686-linux-android
21
22ENV RUST_CONFIGURE_ARGS \
7cac9316
XL
23 --i686-linux-android-ndk=/android/ndk/x86 \
24 --disable-rpath \
25 --enable-extended \
26 --enable-cargo-openssl-static
27
ea8adc8c 28# We support api level 14, but api level 21 is required to build llvm. To
7cac9316 29# overcome this problem we use a ndk with api level 21 to build llvm and then
ea8adc8c 30# switch to a ndk with api level 14 to complete the build. When the linker is
7cac9316 31# invoked there are missing symbols (like sigsetempty, not available with api
ea8adc8c 32# level 14), the default linker behavior is to generate an error, to allow the
7cac9316
XL
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).
35ENV SCRIPT \
ba9703b0 36 python3 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \
7cac9316
XL
37 (export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \
38 rm /android/ndk/x86 && \
ea8adc8c 39 ln -s /android/ndk/x86-14 /android/ndk/x86 && \
ba9703b0 40 python3 ../x.py dist --host $HOSTS --target $HOSTS)
7cac9316 41
7cac9316
XL
42COPY scripts/sccache.sh /scripts/
43RUN sh /scripts/sccache.sh