summaryrefslogtreecommitdiffstats
path: root/src/ci/docker
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /src/ci/docker
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile43
-rw-r--r--src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile2
-rw-r--r--src/ci/docker/host-x86_64/dist-various-1/Dockerfile28
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-various-1/install-riscv32-none-elf.sh7
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-various-1/install-riscv64-none-elf.sh7
-rw-r--r--src/ci/docker/host-x86_64/dist-various-2/Dockerfile10
-rw-r--r--src/ci/docker/host-x86_64/mingw-check/Dockerfile8
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile68
-rwxr-xr-xsrc/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh51
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/Dockerfile59
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile5
-rwxr-xr-xsrc/ci/docker/host-x86_64/x86_64-gnu-llvm-16/script.sh (renamed from src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh)0
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile5
-rwxr-xr-xsrc/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh11
-rwxr-xr-xsrc/ci/docker/run.sh9
-rwxr-xr-xsrc/ci/docker/scripts/build-fuchsia-toolchain.sh (renamed from src/ci/docker/host-x86_64/dist-various-2/build-fuchsia-toolchain.sh)8
-rw-r--r--src/ci/docker/scripts/shared.sh (renamed from src/ci/docker/host-x86_64/dist-various-2/shared.sh)13
17 files changed, 195 insertions, 139 deletions
diff --git a/src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile b/src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile
deleted file mode 100644
index 07dcb9ea9..000000000
--- a/src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile
+++ /dev/null
@@ -1,43 +0,0 @@
-FROM ubuntu:16.04
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- g++ \
- make \
- ninja-build \
- file \
- curl \
- ca-certificates \
- python3 \
- git \
- cmake \
- sudo \
- gdb \
- xz-utils \
- bzip2
-
-COPY scripts/emscripten.sh /scripts/
-RUN bash /scripts/emscripten.sh
-
-COPY scripts/sccache.sh /scripts/
-RUN sh /scripts/sccache.sh
-
-ENV PATH=$PATH:/emsdk-portable
-ENV PATH=$PATH:/emsdk-portable/upstream/emscripten/
-ENV PATH=$PATH:/emsdk-portable/node/12.9.1_64bit/bin/
-ENV BINARYEN_ROOT=/emsdk-portable/upstream/
-
-ENV TARGETS=asmjs-unknown-emscripten
-
-# Use -O1 optimizations in the link step to reduce time spent optimizing JS.
-ENV EMCC_CFLAGS=-O1
-
-# Emscripten installation is user-specific
-ENV NO_CHANGE_USER=1
-
-ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target $TARGETS
-
-# This is almost identical to the wasm32-unknown-emscripten target, so
-# running with assertions again is not useful
-ENV NO_DEBUG_ASSERTIONS=1
-ENV NO_LLVM_ASSERTIONS=1
-ENV NO_OVERFLOW_CHECKS=1
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile
index c88185a20..298282a76 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile
@@ -26,5 +26,5 @@ ENV \
ENV HOSTS=powerpc64-unknown-linux-gnu
-ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
+ENV RUST_CONFIGURE_ARGS --enable-extended --enable-profiler --disable-docs
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
index 3372baed9..ea185cd58 100644
--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
@@ -49,6 +49,12 @@ RUN ./install-x86_64-redox.sh
COPY host-x86_64/dist-various-1/install-aarch64-none-elf.sh /build
RUN ./install-aarch64-none-elf.sh
+COPY host-x86_64/dist-various-1/install-riscv64-none-elf.sh /build
+RUN ./install-riscv64-none-elf.sh
+
+COPY host-x86_64/dist-various-1/install-riscv32-none-elf.sh /build
+RUN ./install-riscv32-none-elf.sh
+
# Suppress some warnings in the openwrt toolchains we downloaded
ENV STAGING_DIR=/tmp
@@ -75,8 +81,7 @@ ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7m-none-eabi
ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7em-none-eabi
ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7em-none-eabihf
-ENV TARGETS=asmjs-unknown-emscripten
-ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
+ENV TARGETS=wasm32-unknown-emscripten
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi
@@ -96,6 +101,7 @@ ENV TARGETS=$TARGETS,thumbv8m.main-none-eabihf
ENV TARGETS=$TARGETS,riscv32i-unknown-none-elf
ENV TARGETS=$TARGETS,riscv32imc-unknown-none-elf
ENV TARGETS=$TARGETS,riscv32imac-unknown-none-elf
+ENV TARGETS=$TARGETS,riscv32imafc-unknown-none-elf
ENV TARGETS=$TARGETS,riscv64imac-unknown-none-elf
ENV TARGETS=$TARGETS,riscv64gc-unknown-none-elf
ENV TARGETS=$TARGETS,armebv7r-none-eabi
@@ -105,9 +111,6 @@ ENV TARGETS=$TARGETS,armv7r-none-eabihf
ENV TARGETS=$TARGETS,thumbv7neon-unknown-linux-gnueabihf
ENV TARGETS=$TARGETS,armv7a-none-eabi
-# riscv targets currently do not need a C compiler, as compiler_builtins
-# doesn't currently have it enabled, and the riscv gcc compiler is not
-# installed.
ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" \
CFLAGS_arm_unknown_linux_musleabi="-march=armv6 -marm" \
CFLAGS_arm_unknown_linux_musleabihf="-march=armv6 -marm -mfpu=vfp" \
@@ -125,11 +128,16 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft
CFLAGS_aarch64_unknown_none_softfloat=-mstrict-align -march=armv8-a+nofp+nosimd \
CC_aarch64_unknown_none=aarch64-none-elf-gcc \
CFLAGS_aarch64_unknown_none=-mstrict-align -march=armv8-a+fp+simd \
- CC_riscv32i_unknown_none_elf=false \
- CC_riscv32imc_unknown_none_elf=false \
- CC_riscv32imac_unknown_none_elf=false \
- CC_riscv64imac_unknown_none_elf=false \
- CC_riscv64gc_unknown_none_elf=false
+ CC_riscv32i_unknown_none_elf=riscv32-unknown-elf-gcc \
+ CFLAGS_riscv32i_unknown_none_elf=-march=rv32i -mabi=ilp32 \
+ CC_riscv32imc_unknown_none_elf=riscv32-unknown-elf-gcc \
+ CFLAGS_riscv32imc_unknown_none_elf=-march=rv32imc -mabi=ilp32 \
+ CC_riscv32imac_unknown_none_elf=riscv32-unknown-elf-gcc \
+ CFLAGS_riscv32imac_unknown_none_elf=-march=rv32imac -mabi=ilp32 \
+ CC_riscv64imac_unknown_none_elf=riscv64-unknown-elf-gcc \
+ CFLAGS_riscv64imac_unknown_none_elf=-march=rv64imac -mabi=lp64 \
+ CC_riscv64gc_unknown_none_elf=riscv64-unknown-elf-gcc \
+ CFLAGS_riscv64gc_unknown_none_elf=-march=rv64gc -mabi=lp64
ENV RUST_CONFIGURE_ARGS \
--musl-root-armv5te=/musl-armv5te \
diff --git a/src/ci/docker/host-x86_64/dist-various-1/install-riscv32-none-elf.sh b/src/ci/docker/host-x86_64/dist-various-1/install-riscv32-none-elf.sh
new file mode 100755
index 000000000..4d83ea479
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-various-1/install-riscv32-none-elf.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# Originally from https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18/riscv32-elf-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz
+curl -L https://ci-mirrors.rust-lang.org/rustc/riscv32-elf-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz \
+| tar --extract --gz --strip 1 --directory /usr/local
diff --git a/src/ci/docker/host-x86_64/dist-various-1/install-riscv64-none-elf.sh b/src/ci/docker/host-x86_64/dist-various-1/install-riscv64-none-elf.sh
new file mode 100755
index 000000000..ddaf961bb
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-various-1/install-riscv64-none-elf.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# Originally from https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18/riscv64-elf-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz
+curl -L https://ci-mirrors.rust-lang.org/rustc/riscv64-elf-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz \
+| tar --extract --gz --strip 1 --directory /usr/local
diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
index 01b46118b..5f1fec74b 100644
--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
@@ -48,9 +48,6 @@ ENV \
AR_x86_64_pc_solaris=x86_64-pc-solaris2.10-ar \
CC_x86_64_pc_solaris=x86_64-pc-solaris2.10-gcc \
CXX_x86_64_pc_solaris=x86_64-pc-solaris2.10-g++ \
- AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \
- CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
- CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ \
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-9 \
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-9 \
AR_x86_64_fortanix_unknown_sgx=ar \
@@ -79,13 +76,11 @@ RUN env \
rm -rf /build/*
WORKDIR /tmp
-COPY host-x86_64/dist-various-2/shared.sh /tmp/
-COPY host-x86_64/dist-various-2/build-fuchsia-toolchain.sh /tmp/
+COPY scripts/shared.sh /tmp/
+COPY scripts/build-fuchsia-toolchain.sh /tmp/
RUN /tmp/build-fuchsia-toolchain.sh
COPY host-x86_64/dist-various-2/build-solaris-toolchain.sh /tmp/
RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386 pc
-# Build deprecated target 'x86_64-sun-solaris2.10' until removed
-RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386 sun
RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc sun
COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/
RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh
@@ -120,7 +115,6 @@ ENV TARGETS=$TARGETS,wasm32-wasi
ENV TARGETS=$TARGETS,wasm32-wasi-preview1-threads
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,x86_64-pc-solaris
-ENV TARGETS=$TARGETS,x86_64-sun-solaris
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
ENV TARGETS=$TARGETS,x86_64-fortanix-unknown-sgx
ENV TARGETS=$TARGETS,nvptx64-nvidia-cuda
diff --git a/src/ci/docker/host-x86_64/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
index 85a9a5d33..f8fcda507 100644
--- a/src/ci/docker/host-x86_64/mingw-check/Dockerfile
+++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
@@ -39,8 +39,14 @@ COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
+
+# Run clippy just to make sure it doesn't error out; we don't actually want to gate on the warnings
+# though.
+# Ideally we'd use stage 1, but that ICEs: https://github.com/rust-lang/rust-clippy/issues/11230
+
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
+ python3 ../x.py clippy --stage 0 -Awarnings && \
python3 ../x.py build --stage 0 src/tools/build-manifest && \
python3 ../x.py test --stage 0 src/tools/compiletest && \
python3 ../x.py test --stage 0 core alloc std test proc_macro && \
@@ -52,7 +58,7 @@ ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 library/test && \
/scripts/validate-toolstate.sh && \
/scripts/validate-error-codes.sh && \
- reuse lint && \
+ reuse --include-submodules lint && \
# Runs checks to ensure that there are no ES5 issues in our JS code.
es-check es6 ../src/librustdoc/html/static/js/*.js && \
eslint -c ../src/librustdoc/html/static/.eslintrc.js ../src/librustdoc/html/static/js/*.js && \
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
new file mode 100644
index 000000000..ba65ba9be
--- /dev/null
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-integration/Dockerfile
@@ -0,0 +1,68 @@
+FROM ubuntu:22.04
+
+ARG DEBIAN_FRONTEND=noninteractive
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ build-essential \
+ g++ \
+ make \
+ ninja-build \
+ file \
+ curl \
+ ca-certificates \
+ python3 \
+ git \
+ cmake \
+ libssl-dev \
+ sudo \
+ xz-utils \
+ pkg-config \
+ unzip \
+ && rm -rf /var/lib/apt/lists/*
+
+# Duplicated in dist-various-2 Dockerfile.
+# FIXME: Move to canonical triple
+ENV \
+ AR_x86_64_fuchsia=x86_64-unknown-fuchsia-ar \
+ CC_x86_64_fuchsia=x86_64-unknown-fuchsia-clang \
+ CFLAGS_x86_64_fuchsia="--target=x86_64-unknown-fuchsia --sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot -I/usr/local/core-linux-amd64-fuchsia-sdk/pkg/fdio/include" \
+ CXX_x86_64_fuchsia=x86_64-unknown-fuchsia-clang++ \
+ CXXFLAGS_x86_64_fuchsia="--target=x86_64-unknown-fuchsia --sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot -I/usr/local/core-linux-amd64-fuchsia-sdk/pkg/fdio/include" \
+ LDFLAGS_x86_64_fuchsia="--target=x86_64-unknown-fuchsia --sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot -L/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib"
+
+WORKDIR /tmp
+COPY scripts/shared.sh /tmp/
+COPY scripts/build-fuchsia-toolchain.sh /tmp/
+RUN /tmp/build-fuchsia-toolchain.sh
+
+ENV CARGO_TARGET_X86_64_FUCHSIA_AR /usr/local/bin/llvm-ar
+ENV CARGO_TARGET_X86_64_FUCHSIA_RUSTFLAGS \
+ -C panic=abort \
+ -C force-unwind-tables=yes \
+ -C link-arg=--sysroot=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot \
+ -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/sysroot/lib \
+ -Lnative=/usr/local/core-linux-amd64-fuchsia-sdk/arch/x64/lib
+
+ENV TARGETS=x86_64-fuchsia
+ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnu
+
+COPY scripts/sccache.sh /scripts/
+RUN sh /scripts/sccache.sh
+
+ENV RUST_INSTALL_DIR /checkout/obj/install
+RUN mkdir -p $RUST_INSTALL_DIR/etc
+
+ENV RUST_CONFIGURE_ARGS \
+ --prefix=$RUST_INSTALL_DIR \
+ --sysconfdir=etc \
+ --enable-lld \
+ --llvm-libunwind=in-tree \
+ --enable-extended \
+ --disable-docs \
+ --set target.x86_64-fuchsia.cc=/usr/local/bin/clang \
+ --set target.x86_64-fuchsia.cxx=/usr/local/bin/clang++ \
+ --set target.x86_64-fuchsia.ar=/usr/local/bin/llvm-ar \
+ --set target.x86_64-fuchsia.ranlib=/usr/local/bin/llvm-ranlib \
+ --set target.x86_64-fuchsia.linker=/usr/local/bin/ld.lld
+ENV SCRIPT \
+ python3 ../x.py install --target $TARGETS compiler/rustc library/std clippy && \
+ bash ../src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh b/src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh
new file mode 100755
index 000000000..4a246f591
--- /dev/null
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-integration/build-fuchsia.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+# Downloads and builds the Fuchsia operating system using a toolchain installed
+# in $RUST_INSTALL_DIR.
+
+set -euf -o pipefail
+
+INTEGRATION_SHA=66793c4894bf6204579bbee3b79956335f31c768
+PICK_REFS=()
+
+checkout=fuchsia
+jiri=.jiri_root/bin/jiri
+
+set -x
+
+# This script will:
+# - create a directory named "fuchsia" if it does not exist
+# - download "jiri" to "fuchsia/.jiri_root/bin"
+curl -s "https://fuchsia.googlesource.com/jiri/+/HEAD/scripts/bootstrap_jiri?format=TEXT" \
+ | base64 --decode \
+ | bash -s $checkout
+
+cd $checkout
+
+$jiri init \
+ -partial=true \
+ -analytics-opt=false \
+ .
+
+$jiri import \
+ -name=integration \
+ -revision=$INTEGRATION_SHA \
+ -overwrite=true \
+ flower \
+ "https://fuchsia.googlesource.com/integration"
+
+if [ -d ".git" ]; then
+ # Wipe out any local changes if we're reusing a checkout.
+ git checkout --force JIRI_HEAD
+fi
+
+$jiri update -autoupdate=false
+
+echo integration commit = $(git -C integration rev-parse HEAD)
+
+for git_ref in "${PICK_REFS[@]}"; do
+ git fetch https://fuchsia.googlesource.com/fuchsia $git_ref
+ git cherry-pick --no-commit FETCH_HEAD
+done
+
+bash scripts/rust/build_fuchsia_from_rust_ci.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/Dockerfile
deleted file mode 100644
index cefdcad76..000000000
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/Dockerfile
+++ /dev/null
@@ -1,59 +0,0 @@
-FROM ubuntu:22.04
-
-ARG DEBIAN_FRONTEND=noninteractive
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- g++ \
- gcc-multilib \
- make \
- ninja-build \
- file \
- curl \
- ca-certificates \
- python3.11 \
- git \
- cmake \
- sudo \
- gdb \
- llvm-15-tools \
- llvm-15-dev \
- libedit-dev \
- libssl-dev \
- pkg-config \
- zlib1g-dev \
- xz-utils \
- nodejs \
- mingw-w64 \
- libgccjit-12-dev \
- && rm -rf /var/lib/apt/lists/*
-
-# Install powershell (universal package) so we can test x.ps1 on Linux
-RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
- dpkg -i powershell.deb && \
- rm -f powershell.deb
-
-COPY scripts/sccache.sh /scripts/
-RUN sh /scripts/sccache.sh
-
-# Make `libgccjit.so` accessible to the linker.
-RUN ln -s /usr/lib/gcc/x86_64-linux-gnu/12/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
-
-# We are disabling CI LLVM since this builder is intentionally using a host
-# LLVM, rather than the typical src/llvm-project LLVM.
-ENV NO_DOWNLOAD_CI_LLVM 1
-
-# This is not the latest LLVM version, so some components required by tests may
-# be missing.
-ENV IS_NOT_LATEST_LLVM 1
-
-# Using llvm-link-shared due to libffi issues -- see #34486
-ENV RUST_CONFIGURE_ARGS \
- --build=x86_64-unknown-linux-gnu \
- --llvm-root=/usr/lib/llvm-15 \
- --enable-llvm-link-shared \
- $USE_NEW_MANGLING \
- --set rust.thin-lto-import-instr-limit=10
-
-COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
-
-ENV SCRIPT /tmp/script.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile
index c177e7387..f4850715e 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
nodejs \
mingw-w64 \
+ libgccjit-12-dev \
&& rm -rf /var/lib/apt/lists/*
+# Note: libgccjit needs to match the default gcc version for the linker to find it.
+
# Install powershell (universal package) so we can test x.ps1 on Linux
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
dpkg -i powershell.deb && \
@@ -49,6 +52,6 @@ ENV RUST_CONFIGURE_ARGS \
--enable-llvm-link-shared \
--set rust.thin-lto-import-instr-limit=10
-COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
+COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
ENV SCRIPT /tmp/script.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/script.sh
index 2eb751ca3..2eb751ca3 100755
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/script.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile
index 76846f1fe..f1d6b9a4e 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
nodejs \
mingw-w64 \
+ libgccjit-13-dev \
&& rm -rf /var/lib/apt/lists/*
+# Note: libgccjit needs to match the default gcc version for the linker to find it.
+
# Install powershell (universal package) so we can test x.ps1 on Linux
RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/powershell_7.3.1-1.deb_amd64.deb" > powershell.deb && \
dpkg -i powershell.deb && \
@@ -45,6 +48,6 @@ ENV RUST_CONFIGURE_ARGS \
--enable-llvm-link-shared \
--set rust.thin-lto-import-instr-limit=10
-COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
+COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/
ENV SCRIPT /tmp/script.sh
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh b/src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh
index 821a09feb..205ee2632 100755
--- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh
@@ -25,7 +25,16 @@ cat /tmp/toolstate/toolstates.json
python3 "$X_PY" test --stage 2 check-tools
python3 "$X_PY" test --stage 2 src/tools/clippy
python3 "$X_PY" test --stage 2 src/tools/rustfmt
-python3 "$X_PY" test --stage 2 src/tools/miri
+
+# Testing Miri is a bit more complicated.
+# We set the GC interval to the shortest possible value (0 would be off) to increase the chance
+# that bugs which only surface when the GC runs at a specific time are more likely to cause CI to fail.
+# This significantly increases the runtime of our test suite, or we'd do this in PR CI too.
+if [[ -z "${PR_CI_JOB:-}" ]]; then
+ MIRIFLAGS=-Zmiri-provenance-gc=1 python3 "$X_PY" test --stage 2 src/tools/miri
+else
+ python3 "$X_PY" test --stage 2 src/tools/miri
+fi
# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
# Also cover some other targets via cross-testing, in particular all tier 1 targets.
export BOOTSTRAP_SKIP_TARGET_SANITY=1 # we don't need `cc` for these targets
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index cedbc0390..636692a09 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -269,14 +269,9 @@ touch $objdir/${SUMMARY_FILE}
extra_env=""
if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
- extra_env="$EXTRA_ENV --env ENABLE_GCC_CODEGEN=1"
- # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling`
- # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.
- # `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one
- # if we run `cg_gcc` tests.
- extra_env="$EXTRA_ENV --env USE_NEW_MANGLING=--enable-new-symbol-mangling"
+ extra_env="$extra_env --env ENABLE_GCC_CODEGEN=1"
# Fix rustc_codegen_gcc lto issues.
- extra_env="$EXTRA_ENV --env GCC_EXEC_PREFIX=/usr/lib/gcc/"
+ extra_env="$extra_env --env GCC_EXEC_PREFIX=/usr/lib/gcc/"
echo "Setting extra environment values for docker: $extra_env"
fi
diff --git a/src/ci/docker/host-x86_64/dist-various-2/build-fuchsia-toolchain.sh b/src/ci/docker/scripts/build-fuchsia-toolchain.sh
index d762b4672..beea2f522 100755
--- a/src/ci/docker/host-x86_64/dist-various-2/build-fuchsia-toolchain.sh
+++ b/src/ci/docker/scripts/build-fuchsia-toolchain.sh
@@ -4,13 +4,13 @@ set -ex
source shared.sh
FUCHSIA_SDK_URL=https://chrome-infra-packages.appspot.com/dl/fuchsia/sdk/core/linux-amd64
-FUCHSIA_SDK_ID=4xjxrGUrDbQ6_zJwj6cDN1IbWsWV5aCQXC_zO_Hu0XkC
-FUCHSIA_SDK_SHA256=e318f1ac652b0db43aff32708fa70337521b5ac595e5a0905c2ff33bf1eed179
+FUCHSIA_SDK_ID=MrhQwtmP8CpZre-i_PNOREcThbUcrX3bA-45d6WQr-cC
+FUCHSIA_SDK_SHA256=32b850c2d98ff02a59adefa2fcf34e44471385b51cad7ddb03ee3977a590afe7
FUCHSIA_SDK_USR_DIR=/usr/local/core-linux-amd64-fuchsia-sdk
CLANG_DOWNLOAD_URL=\
https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/linux-amd64
-CLANG_DOWNLOAD_ID=vU0vNjSihOV4Q6taQYCpy03JXGiCyVwxen3rFMNMIgsC
-CLANG_DOWNLOAD_SHA256=bd4d2f3634a284e57843ab5a4180a9cb4dc95c6882c95c317a7deb14c34c220b
+CLANG_DOWNLOAD_ID=Tpc85d1ZwSlZ6UKl2d96GRUBGNA5JKholOKe24sRDr0C
+CLANG_DOWNLOAD_SHA256=4e973ce5dd59c12959e942a5d9df7a19150118d03924a86894e29edb8b110ebd
install_clang() {
mkdir -p clang_download
diff --git a/src/ci/docker/host-x86_64/dist-various-2/shared.sh b/src/ci/docker/scripts/shared.sh
index 291f26bda..996965908 100644
--- a/src/ci/docker/host-x86_64/dist-various-2/shared.sh
+++ b/src/ci/docker/scripts/shared.sh
@@ -1,5 +1,11 @@
-#!/usr/bin/env bash
-hide_output() {
+#!/bin/false
+# shellcheck shell=bash
+
+# This file is intended to be sourced with `. shared.sh` or
+# `source shared.sh`, hence the invalid shebang and not being
+# marked as an executable file in git.
+
+function hide_output {
{ set +x; } 2>/dev/null
on_err="
echo ERROR: An error was encountered with the build.
@@ -15,7 +21,8 @@ exit 1
set -x
}
-# Copied from ../../shared.sh
+# See https://unix.stackexchange.com/questions/82598
+# Duplicated in src/ci/shared.sh
function retry {
echo "Attempting with retry:" "$@"
local n=1