]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred"
[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
44 # Using llvm-link-shared due to libffi issues -- see #34486
45 ENV RUST_CONFIGURE_ARGS \
46       --build=x86_64-unknown-linux-gnu \
47       --llvm-root=/usr/lib/llvm-13 \
48       --enable-llvm-link-shared \
49       --set rust.thin-lto-import-instr-limit=10
50
51 # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
52 ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \
53            # Run the `mir-opt` tests again but this time for a 32-bit target.
54            # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
55            # both 32-bit and 64-bit outputs updated by the PR author, before
56            # the PR is approved and tested for merging.
57            # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
58            # despite having different output on 32-bit vs 64-bit targets.
59            ../x --stage 2 test src/test/mir-opt \
60                              --host='' --target=i686-unknown-linux-gnu && \
61            # Run the UI test suite again, but in `--pass=check` mode
62            #
63            # This is intended to make sure that both `--pass=check` continues to
64            # work.
65            #
66            ../x.ps1 --stage 2 test src/test/ui --pass=check \
67                              --host='' --target=i686-unknown-linux-gnu && \
68            # Run tidy at the very end, after all the other tests.
69            python2.7 ../x.py --stage 2 test src/tools/tidy