about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorOli Scherer <github35764891676564198441@oli-obk.de>2024-12-21 05:35:01 +0000
committerGitHub <noreply@github.com>2024-12-21 05:35:01 +0000
commit268a5f423e07342be211e9c7fdcca978a67a316f (patch)
treef94edeea509f7a1b050b0ea44cfe853dbf8c635d /src/ci/docker
parentfddff471f6b31312bbe88c70312cd036c8439794 (diff)
parent591c47b2474e5a05024e96080f9cf001a13ad019 (diff)
downloadrust-268a5f423e07342be211e9c7fdcca978a67a316f.tar.gz
rust-268a5f423e07342be211e9c7fdcca978a67a316f.zip
Merge pull request #4102 from rust-lang/rustup-2024-12-21
Automatic Rustup
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile99
-rw-r--r--src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile32
-rw-r--r--src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig10
-rw-r--r--src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile8
-rw-r--r--src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile2
-rw-r--r--src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh16
-rw-r--r--src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile9
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh (renamed from src/ci/docker/scripts/build-clang.sh)4
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh (renamed from src/ci/docker/scripts/build-gcc.sh)10
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh (renamed from src/ci/docker/scripts/build-gccjit.sh)0
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh (renamed from src/ci/docker/scripts/build-zstd.sh)0
-rw-r--r--src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh16
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile4
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile4
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile4
15 files changed, 94 insertions, 124 deletions
diff --git a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile
deleted file mode 100644
index 4f4caa5fa50..00000000000
--- a/src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile
+++ /dev/null
@@ -1,99 +0,0 @@
-# We document platform support for minimum glibc 2.17 and kernel 3.2.
-# CentOS 7 has headers for kernel 3.10, but that's fine as long as we don't
-# actually use newer APIs in rustc or std without a fallback. It's more
-# important that we match glibc for ELF symbol versioning.
-FROM centos:7
-
-WORKDIR /build
-
-# CentOS 7 EOL is June 30, 2024, but the repos remain in the vault.
-RUN sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \
-  -e 's!^#baseurl=http://mirror.centos.org/!baseurl=https://vault.centos.org/!'
-RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
-
-RUN yum upgrade -y && \
-    yum install -y \
-      automake \
-      bzip2 \
-      file \
-      gcc \
-      gcc-c++ \
-      git \
-      glibc-devel \
-      libedit-devel \
-      libstdc++-devel \
-      make \
-      ncurses-devel \
-      openssl-devel \
-      patch \
-      perl \
-      perl-core \
-      pkgconfig \
-      python3 \
-      unzip \
-      wget \
-      xz \
-      zlib-devel \
-      && yum clean all
-
-RUN mkdir -p /rustroot/bin
-
-ENV PATH=/rustroot/bin:$PATH
-ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib
-ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
-WORKDIR /tmp
-RUN mkdir /home/user
-COPY scripts/shared.sh /tmp/
-
-# Need at least GCC 5.1 to compile LLVM
-COPY scripts/build-gcc.sh /tmp/
-RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
-
-ENV CC=gcc CXX=g++
-
-# LLVM 17 needs cmake 3.20 or higher.
-COPY scripts/cmake.sh /tmp/
-RUN ./cmake.sh
-
-# Build LLVM+Clang
-COPY scripts/build-clang.sh /tmp/
-ENV LLVM_BUILD_TARGETS=AArch64
-RUN ./build-clang.sh
-ENV CC=clang CXX=clang++
-
-# Build zstd to enable `llvm.libzstd`.
-COPY scripts/build-zstd.sh /tmp/
-RUN ./build-zstd.sh
-
-COPY scripts/sccache.sh /scripts/
-RUN sh /scripts/sccache.sh
-
-ENV PGO_HOST=aarch64-unknown-linux-gnu
-ENV HOSTS=aarch64-unknown-linux-gnu
-
-ENV CPATH=/usr/include/aarch64-linux-gnu/:$CPATH
-
-ENV RUST_CONFIGURE_ARGS \
-      --build=aarch64-unknown-linux-gnu \
-      --enable-full-tools \
-      --enable-profiler \
-      --enable-sanitizers \
-      --enable-compiler-docs \
-      --set target.aarch64-unknown-linux-gnu.linker=clang \
-      --set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \
-      --set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
-      --set llvm.link-shared=true \
-      --set llvm.thin-lto=true \
-      --set llvm.libzstd=true \
-      --set llvm.ninja=false \
-      --set rust.debug-assertions=false \
-      --set rust.jemalloc \
-      --set rust.use-lld=true \
-      --set rust.codegen-units=1
-
-ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
-
-ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang
-ENV DIST_SRC 1
-ENV LIBCURL_NO_PKG_CONFIG 1
-ENV DIST_REQUIRE_ALL_TOOLS 1
diff --git a/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile
new file mode 100644
index 00000000000..18972387e34
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile
@@ -0,0 +1,32 @@
+FROM ubuntu:22.04
+
+COPY scripts/cross-apt-packages.sh /scripts/
+RUN sh /scripts/cross-apt-packages.sh
+
+COPY scripts/crosstool-ng.sh /scripts/
+RUN sh /scripts/crosstool-ng.sh
+
+COPY scripts/rustbuild-setup.sh /scripts/
+RUN sh /scripts/rustbuild-setup.sh
+WORKDIR /tmp
+
+COPY scripts/crosstool-ng-build.sh /scripts/
+COPY host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig /tmp/crosstool.defconfig
+RUN /scripts/crosstool-ng-build.sh
+
+COPY scripts/sccache.sh /scripts/
+RUN sh /scripts/sccache.sh
+
+ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnu/bin
+
+ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-gcc \
+    AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-ar \
+    CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnu-g++
+
+ENV HOSTS=aarch64-unknown-linux-gnu
+
+ENV RUST_CONFIGURE_ARGS \
+      --enable-full-tools \
+      --enable-profiler \
+      --enable-sanitizers
+ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
diff --git a/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig b/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig
new file mode 100644
index 00000000000..520b1667c8b
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.defconfig
@@ -0,0 +1,10 @@
+CT_CONFIG_VERSION="4"
+CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
+CT_USE_MIRROR=y
+CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
+CT_ARCH_ARM=y
+CT_ARCH_64=y
+CT_KERNEL_LINUX=y
+CT_LINUX_V_4_1=y
+CT_GLIBC_V_2_17=y
+CT_CC_LANG_CXX=y
diff --git a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile
index 7cf1c80dfbc..414bcc52484 100644
--- a/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile
@@ -46,11 +46,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib
 ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
 WORKDIR /tmp
 RUN mkdir /home/user
-COPY scripts/shared.sh /tmp/
+COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
 
 # Need at least GCC 5.1 to compile LLVM nowadays
-COPY scripts/build-gcc.sh /tmp/
-ENV GCC_BUILD_TARGET=i686
+COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
 RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
 
 COPY scripts/cmake.sh /tmp/
@@ -58,8 +57,7 @@ RUN ./cmake.sh
 
 # Now build LLVM+Clang, afterwards configuring further compilations to use the
 # clang/clang++ compilers.
-COPY scripts/build-clang.sh /tmp/
-ENV LLVM_BUILD_TARGETS=X86
+COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
 RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile
index 9d3be51d037..9ef39189249 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile
@@ -18,7 +18,7 @@ RUN /scripts/crosstool-ng-build.sh
 WORKDIR /build
 
 RUN apt-get install -y --no-install-recommends rpm2cpio cpio
-COPY scripts/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/
+COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/
 RUN ./build-powerpc64le-toolchain.sh
 
 COPY scripts/sccache.sh /scripts/
diff --git a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh
new file mode 100644
index 00000000000..dc86dddd464
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+hide_output() {
+  set +x
+  on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+  trap "$on_err" ERR
+  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+  PING_LOOP_PID=$!
+  "$@" &> /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  set -x
+}
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
index c13c340871c..e857f38e68a 100644
--- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
@@ -46,10 +46,10 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib
 ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
 WORKDIR /tmp
 RUN mkdir /home/user
-COPY scripts/shared.sh /tmp/
+COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
 
 # Need at least GCC 5.1 to compile LLVM nowadays
-COPY scripts/build-gcc.sh /tmp/
+COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
 RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
 
 # LLVM 17 needs cmake 3.20 or higher.
@@ -58,13 +58,12 @@ RUN ./cmake.sh
 
 # Now build LLVM+Clang, afterwards configuring further compilations to use the
 # clang/clang++ compilers.
-COPY scripts/build-clang.sh /tmp/
-ENV LLVM_BUILD_TARGETS=X86
+COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
 RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
 # Build zstd to enable `llvm.libzstd`.
-COPY scripts/build-zstd.sh /tmp/
+COPY host-x86_64/dist-x86_64-linux/build-zstd.sh /tmp/
 RUN ./build-zstd.sh
 
 COPY scripts/sccache.sh /scripts/
diff --git a/src/ci/docker/scripts/build-clang.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh
index 47bfcfbecab..2e08c87f278 100755
--- a/src/ci/docker/scripts/build-clang.sh
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-set -exu
+set -ex
 
 source shared.sh
 
@@ -34,7 +34,7 @@ hide_output \
       -DCOMPILER_RT_BUILD_XRAY=OFF \
       -DCOMPILER_RT_BUILD_MEMPROF=OFF \
       -DCOMPILER_RT_BUILD_CTX_PROFILE=OFF \
-      -DLLVM_TARGETS_TO_BUILD=$LLVM_BUILD_TARGETS \
+      -DLLVM_TARGETS_TO_BUILD=X86 \
       -DLLVM_INCLUDE_BENCHMARKS=OFF \
       -DLLVM_INCLUDE_TESTS=OFF \
       -DLLVM_INCLUDE_EXAMPLES=OFF \
diff --git a/src/ci/docker/scripts/build-gcc.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh
index 78a038215e4..e939a5d7eac 100755
--- a/src/ci/docker/scripts/build-gcc.sh
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh
@@ -50,9 +50,7 @@ cd ..
 rm -rf gcc-build
 rm -rf gcc-$GCC
 
-if [[ $GCC_BUILD_TARGET == "i686" ]]; then
-    # FIXME: clang doesn't find 32-bit libraries in /rustroot/lib,
-    # but it does look all the way under /rustroot/lib/[...]/32,
-    # so we can link stuff there to help it out.
-    ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/
-fi
+# FIXME: clang doesn't find 32-bit libraries in /rustroot/lib,
+# but it does look all the way under /rustroot/lib/[...]/32,
+# so we can link stuff there to help it out.
+ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/
diff --git a/src/ci/docker/scripts/build-gccjit.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh
index c565922dcd1..c565922dcd1 100755
--- a/src/ci/docker/scripts/build-gccjit.sh
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh
diff --git a/src/ci/docker/scripts/build-zstd.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh
index a3d37ccc311..a3d37ccc311 100755
--- a/src/ci/docker/scripts/build-zstd.sh
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh
new file mode 100644
index 00000000000..dc86dddd464
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+hide_output() {
+  set +x
+  on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+  trap "$on_err" ERR
+  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+  PING_LOOP_PID=$!
+  "$@" &> /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  set -x
+}
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile
index 0a58f337d9d..e157debfd09 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile
@@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \
       --set rust.randomize-layout=true \
       --set rust.thin-lto-import-instr-limit=10
 
-COPY scripts/shared.sh /scripts/
-COPY scripts/build-gccjit.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
 
 RUN /scripts/build-gccjit.sh /scripts
 
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile
index 092847cdfe0..e7016e7d3c0 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile
@@ -54,8 +54,8 @@ ENV RUST_CONFIGURE_ARGS \
       --set rust.randomize-layout=true \
       --set rust.thin-lto-import-instr-limit=10
 
-COPY scripts/shared.sh /scripts/
-COPY scripts/build-gccjit.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
 
 RUN /scripts/build-gccjit.sh /scripts
 
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
index ab749b3fdd5..2a09cd54b13 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
@@ -89,8 +89,8 @@ ENV HOST_TARGET x86_64-unknown-linux-gnu
 # assertions enabled! Therefore, we cannot force download CI rustc.
 #ENV FORCE_CI_RUSTC 1
 
-COPY scripts/shared.sh /scripts/
-COPY scripts/build-gccjit.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
+COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
 
 RUN /scripts/build-gccjit.sh /scripts