]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
Auto merge of #101837 - scottmcm:box-array-from-vec, r=m-ou-se
[rust.git] / src / ci / docker / host-x86_64 / x86_64-gnu-llvm-13 / Dockerfile
1 FROM ubuntu:22.04
2
3 ARG DEBIAN_FRONTEND=noninteractive
4
5 # NOTE: intentionally installs both python2 and python3 so we can test support for both.
6 RUN apt-get update && apt-get install -y --no-install-recommends \
7   g++ \
8   gcc-multilib \
9   make \
10   ninja-build \
11   file \
12   curl \
13   ca-certificates \
14   python2.7 \
15   python3.9 \
16   git \
17   cmake \
18   sudo \
19   gdb \
20   llvm-13-tools \
21   llvm-13-dev \
22   libedit-dev \
23   libssl-dev \
24   pkg-config \
25   zlib1g-dev \
26   xz-utils \
27   nodejs
28
29 # Install powershell so we can test x.ps1 on Linux
30 RUN apt-get update && \
31     apt-get install -y apt-transport-https software-properties-common && \
32     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb && \
33     dpkg -i packages-microsoft-prod.deb && \
34     apt-get update && \
35     apt-get install -y powershell
36
37 COPY scripts/sccache.sh /scripts/
38 RUN sh /scripts/sccache.sh
39
40 # We are disabling CI LLVM since this builder is intentionally using a host
41 # LLVM, rather than the typical src/llvm-project LLVM.
42 ENV NO_DOWNLOAD_CI_LLVM 1
43 ENV EXTERNAL_LLVM 1
44
45 # Using llvm-link-shared due to libffi issues -- see #34486
46 ENV RUST_CONFIGURE_ARGS \
47       --build=x86_64-unknown-linux-gnu \
48       --llvm-root=/usr/lib/llvm-13 \
49       --enable-llvm-link-shared \
50       --set rust.thin-lto-import-instr-limit=10
51
52 # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
53 ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \
54            # Run the `mir-opt` tests again but this time for a 32-bit target.
55            # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
56            # both 32-bit and 64-bit outputs updated by the PR author, before
57            # the PR is approved and tested for merging.
58            # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
59            # despite having different output on 32-bit vs 64-bit targets.
60            ../x --stage 2 test src/test/mir-opt \
61                              --host='' --target=i686-unknown-linux-gnu && \
62            # Run the UI test suite again, but in `--pass=check` mode
63            #
64            # This is intended to make sure that both `--pass=check` continues to
65            # work.
66            #
67            ../x.ps1 --stage 2 test src/test/ui --pass=check \
68                              --host='' --target=i686-unknown-linux-gnu && \
69            # Run tidy at the very end, after all the other tests.
70            python2.7 ../x.py --stage 2 test src/tools/tidy