about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-12-18 05:03:32 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-12-18 05:03:32 +0000
commitd49845e5fe45bcffe30df0963a97b2ad859abbf8 (patch)
tree95c98c8b70f583931bf51b01a8fcf0cf854f2dc0 /src/ci/docker
parentb6120f98c5ad9f16d613d6fd55f546b186d40bae (diff)
parent6bc1fe1c3a40367abf3d54253fb1a478ced4b73b (diff)
downloadrust-d49845e5fe45bcffe30df0963a97b2ad859abbf8.tar.gz
rust-d49845e5fe45bcffe30df0963a97b2ad859abbf8.zip
Merge from rustc
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile31
-rw-r--r--src/ci/docker/host-x86_64/dist-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig16
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile9
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile9
-rwxr-xr-xsrc/ci/docker/scripts/add_dummy_commit.sh19
-rwxr-xr-xsrc/ci/docker/scripts/x86_64-gnu-llvm.sh37
-rwxr-xr-xsrc/ci/docker/scripts/x86_64-gnu-llvm1.sh12
-rwxr-xr-xsrc/ci/docker/scripts/x86_64-gnu-llvm2.sh25
-rwxr-xr-xsrc/ci/docker/scripts/x86_64-gnu-llvm3.sh25
9 files changed, 139 insertions, 44 deletions
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 5dc282403be..9ef39189249 100644
--- a/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile
@@ -3,23 +3,46 @@ FROM ubuntu:22.04
 COPY scripts/cross-apt-packages.sh /scripts/
 RUN sh /scripts/cross-apt-packages.sh
 
+COPY scripts/crosstool-ng-git.sh /scripts/
+RUN sh /scripts/crosstool-ng-git.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-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig /tmp/crosstool.defconfig
+RUN /scripts/crosstool-ng-build.sh
+
+WORKDIR /build
+
 RUN apt-get install -y --no-install-recommends rpm2cpio cpio
-COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /tmp/
+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/
 RUN sh /scripts/sccache.sh
 
+ENV PATH=$PATH:/x-tools/powerpc64le-unknown-linux-musl/bin
+
 ENV \
     AR_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-ar \
     CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc \
-    CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++
+    CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++ \
+    AR_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-ar \
+    CC_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-gcc \
+    CXX_powerpc64le_unknown_linux_musl=powerpc64le-unknown-linux-musl-g++
+
+ENV HOSTS=powerpc64le-unknown-linux-gnu,powerpc64le-unknown-linux-musl
 
-ENV HOSTS=powerpc64le-unknown-linux-gnu
+ENV RUST_CONFIGURE_ARGS \
+    --enable-extended \
+    --enable-full-tools \
+    --enable-profiler \
+    --enable-sanitizers \
+    --disable-docs \
+    --set target.powerpc64le-unknown-linux-musl.crt-static=false \
+    --musl-root-powerpc64le=/x-tools/powerpc64le-unknown-linux-musl/powerpc64le-unknown-linux-musl/sysroot/usr
 
-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-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig
new file mode 100644
index 00000000000..c6cde30b2a4
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/powerpc64le-unknown-linux-musl.defconfig
@@ -0,0 +1,16 @@
+CT_CONFIG_VERSION="4"
+CT_EXPERIMENTAL=y
+CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
+CT_USE_MIRROR=y
+CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
+CT_ARCH_POWERPC=y
+CT_ARCH_LE=y
+CT_ARCH_64=y
+# CT_DEMULTILIB is not set
+CT_ARCH_ARCH="powerpc64le"
+CT_KERNEL_LINUX=y
+CT_LINUX_V_4_19=y
+CT_LIBC_MUSL=y
+CT_MUSL_V_1_2_3=y
+CT_CC_LANG_CXX=y
+CT_GETTEXT_NEEDED=y
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 487da580152..42df58517ca 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
@@ -59,5 +59,10 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
 
 RUN /scripts/build-gccjit.sh /scripts
 
-COPY scripts/x86_64-gnu-llvm.sh /tmp/script.sh
-ENV SCRIPT /tmp/script.sh
+ARG SCRIPT_ARG
+COPY scripts/add_dummy_commit.sh /tmp/add_dummy_commit.sh
+COPY scripts/x86_64-gnu-llvm.sh /tmp/x86_64-gnu-llvm.sh
+COPY scripts/x86_64-gnu-llvm1.sh /tmp/x86_64-gnu-llvm1.sh
+COPY scripts/x86_64-gnu-llvm2.sh /tmp/x86_64-gnu-llvm2.sh
+COPY scripts/x86_64-gnu-llvm3.sh /tmp/x86_64-gnu-llvm3.sh
+ENV SCRIPT /tmp/${SCRIPT_ARG}
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 4991908fe77..f2aadbe87cf 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
@@ -59,5 +59,10 @@ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
 
 RUN /scripts/build-gccjit.sh /scripts
 
-COPY scripts/x86_64-gnu-llvm.sh /tmp/script.sh
-ENV SCRIPT /tmp/script.sh
+ARG SCRIPT_ARG
+COPY scripts/add_dummy_commit.sh /tmp/add_dummy_commit.sh
+COPY scripts/x86_64-gnu-llvm.sh /tmp/x86_64-gnu-llvm.sh
+COPY scripts/x86_64-gnu-llvm1.sh /tmp/x86_64-gnu-llvm1.sh
+COPY scripts/x86_64-gnu-llvm2.sh /tmp/x86_64-gnu-llvm2.sh
+COPY scripts/x86_64-gnu-llvm3.sh /tmp/x86_64-gnu-llvm3.sh
+ENV SCRIPT /tmp/${SCRIPT_ARG}
diff --git a/src/ci/docker/scripts/add_dummy_commit.sh b/src/ci/docker/scripts/add_dummy_commit.sh
new file mode 100755
index 00000000000..029e4ae141f
--- /dev/null
+++ b/src/ci/docker/scripts/add_dummy_commit.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -ex
+
+if [ "$READ_ONLY_SRC" = "0" ]; then
+    # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
+    # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
+    # compiler and/or library. Here we are adding a dummy commit on compiler and running
+    # that test to make sure we never download CI rustc with a change on the compiler tree.
+    echo "" >> ../compiler/rustc/src/main.rs
+    git config --global user.email "dummy@dummy.com"
+    git config --global user.name "dummy"
+    git add ../compiler/rustc/src/main.rs
+    git commit -m "test commit for rust.download-rustc=if-unchanged logic"
+    DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
+        -- core::builder::tests::ci_rustc_if_unchanged_logic
+    # Revert the dummy commit
+    git reset --hard HEAD~1
+fi
diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm.sh b/src/ci/docker/scripts/x86_64-gnu-llvm.sh
index dea38b6fd2a..e7dcc1ddff4 100755
--- a/src/ci/docker/scripts/x86_64-gnu-llvm.sh
+++ b/src/ci/docker/scripts/x86_64-gnu-llvm.sh
@@ -2,42 +2,7 @@
 
 set -ex
 
-if [ "$READ_ONLY_SRC" = "0" ]; then
-    # `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
-    # "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
-    # compiler and/or library. Here we are adding a dummy commit on compiler and running
-    # that test to make sure we never download CI rustc with a change on the compiler tree.
-    echo "" >> ../compiler/rustc/src/main.rs
-    git config --global user.email "dummy@dummy.com"
-    git config --global user.name "dummy"
-    git add ../compiler/rustc/src/main.rs
-    git commit -m "test commit for rust.download-rustc=if-unchanged logic"
-    DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
-        -- core::builder::tests::ci_rustc_if_unchanged_logic
-    # Revert the dummy commit
-    git reset --hard HEAD~1
-fi
-
-# Only run the stage 1 tests on merges, not on PR CI jobs.
-if [[ -z "${PR_CI_JOB}" ]]; then
-    ../x.py --stage 1 test --skip src/tools/tidy
-
-    # Run the `mir-opt` tests again but this time for a 32-bit target.
-    # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
-    # both 32-bit and 64-bit outputs updated by the PR author, before
-    # the PR is approved and tested for merging.
-    # It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
-    # despite having different output on 32-bit vs 64-bit targets.
-    ../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu
-
-    # Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0
-    # compiler, and is sensitive to the addition of new flags.
-    ../x.py --stage 1 test tests/ui-fulldeps
-
-    # Rebuild the stdlib with the size optimizations enabled and run tests again.
-    RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \
-        library/std library/alloc library/core
-fi
+/tmp/add_dummy_commit.sh
 
 # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
 ../x.py --stage 2 test --skip src/tools/tidy
diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm1.sh b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh
new file mode 100755
index 00000000000..56ef39aae15
--- /dev/null
+++ b/src/ci/docker/scripts/x86_64-gnu-llvm1.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -ex
+
+/tmp/add_dummy_commit.sh
+
+../x.py --stage 2 test \
+  --skip tests \
+  --skip coverage-map \
+  --skip coverage-run \
+  --skip library \
+  --skip tidyselftest
diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm2.sh b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh
new file mode 100755
index 00000000000..c9f6b98f01f
--- /dev/null
+++ b/src/ci/docker/scripts/x86_64-gnu-llvm2.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -ex
+
+/tmp/add_dummy_commit.sh
+
+##### Test stage 2 #####
+
+../x.py --stage 2 test \
+  --skip compiler \
+  --skip src
+
+# Run the `mir-opt` tests again but this time for a 32-bit target.
+# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
+# both 32-bit and 64-bit outputs updated by the PR author, before
+# the PR is approved and tested for merging.
+# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
+# despite having different output on 32-bit vs 64-bit targets.
+../x --stage 2 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu
+
+# Run the UI test suite again, but in `--pass=check` mode
+#
+# This is intended to make sure that both `--pass=check` continues to
+# work.
+../x.ps1 --stage 2 test tests/ui --pass=check --host='' --target=i686-unknown-linux-gnu
diff --git a/src/ci/docker/scripts/x86_64-gnu-llvm3.sh b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh
new file mode 100755
index 00000000000..d1bf2dab1e2
--- /dev/null
+++ b/src/ci/docker/scripts/x86_64-gnu-llvm3.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -ex
+
+/tmp/add_dummy_commit.sh
+
+##### Test stage 1 #####
+
+../x.py --stage 1 test --skip src/tools/tidy
+
+# Run the `mir-opt` tests again but this time for a 32-bit target.
+# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
+# both 32-bit and 64-bit outputs updated by the PR author, before
+# the PR is approved and tested for merging.
+# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
+# despite having different output on 32-bit vs 64-bit targets.
+../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu
+
+# Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0
+# compiler, and is sensitive to the addition of new flags.
+../x.py --stage 1 test tests/ui-fulldeps
+
+# Rebuild the stdlib with the size optimizations enabled and run tests again.
+RUSTFLAGS_NOT_BOOTSTRAP="--cfg feature=\"optimize_for_size\"" ../x.py --stage 1 test \
+    library/std library/alloc library/core