diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15c6d4011e1..6ffc8a7ad52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -428,7 +428,7 @@ jobs: os: windows-latest-xl - name: x86_64-msvc-tools env: - SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows + SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json" os: windows-latest-xl - name: i686-mingw-1 diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml index 3de27bc54c5..3de5a19f851 100644 --- a/src/ci/azure-pipelines/auto.yml +++ b/src/ci/azure-pipelines/auto.yml @@ -151,7 +151,7 @@ jobs: NO_LLVM_ASSERTIONS: 1 # MSVC tools tests x86_64-msvc-tools: - SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py + SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py INITIAL_RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json # 32/64-bit MinGW builds. diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md index 95936d65432..7e79cc88513 100644 --- a/src/ci/docker/README.md +++ b/src/ci/docker/README.md @@ -25,9 +25,11 @@ before running your command. ## Filesystem layout -- Each directory, excluding `scripts` and `disabled`, corresponds to a docker image -- `scripts` contains files shared by docker images -- `disabled` contains images that are not built on CI +- Each host architecture has its own `host-{arch}` directory, and those + directories contain a subdirectory for each Docker image (plus the `disabled` + subdirectory). +- `host-{arch}/disabled` contains images that are not built on CI. +- `scripts` contains files shared by multiple Docker images. ## Docker Toolbox on Windows diff --git a/src/ci/docker/arm-android/Dockerfile b/src/ci/docker/host-x86_64/arm-android/Dockerfile similarity index 93% rename from src/ci/docker/arm-android/Dockerfile rename to src/ci/docker/host-x86_64/arm-android/Dockerfile index 77514848167..aa9335c473b 100644 --- a/src/ci/docker/arm-android/Dockerfile +++ b/src/ci/docker/host-x86_64/arm-android/Dockerfile @@ -20,7 +20,7 @@ RUN dpkg --add-architecture i386 && \ COPY scripts/android-sdk.sh /scripts/ COPY scripts/android-sdk-manager.py /scripts/ -COPY arm-android/android-sdk.lock /android/sdk/android-sdk.lock +COPY host-x86_64/arm-android/android-sdk.lock /android/sdk/android-sdk.lock RUN /scripts/android-sdk.sh ENV PATH=$PATH:/android/sdk/emulator diff --git a/src/ci/docker/arm-android/android-sdk.lock b/src/ci/docker/host-x86_64/arm-android/android-sdk.lock similarity index 100% rename from src/ci/docker/arm-android/android-sdk.lock rename to src/ci/docker/host-x86_64/arm-android/android-sdk.lock diff --git a/src/ci/docker/armhf-gnu/Dockerfile b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile similarity index 98% rename from src/ci/docker/armhf-gnu/Dockerfile rename to src/ci/docker/host-x86_64/armhf-gnu/Dockerfile index d1bc70689e1..71071761f05 100644 --- a/src/ci/docker/armhf-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile @@ -31,7 +31,7 @@ WORKDIR /build # The `vexpress_config` config file was a previously generated config file for # the kernel. This file was generated by running `make vexpress_defconfig` # followed by `make menuconfig` and then enabling the IPv6 protocol page. -COPY armhf-gnu/vexpress_config /build/.config +COPY host-x86_64/armhf-gnu/vexpress_config /build/.config RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \ tar xJf - && \ cd /build/linux-4.4.42 && \ diff --git a/src/ci/docker/armhf-gnu/vexpress_config b/src/ci/docker/host-x86_64/armhf-gnu/vexpress_config similarity index 100% rename from src/ci/docker/armhf-gnu/vexpress_config rename to src/ci/docker/host-x86_64/armhf-gnu/vexpress_config diff --git a/src/ci/docker/disabled/aarch64-gnu/Dockerfile b/src/ci/docker/host-x86_64/disabled/aarch64-gnu/Dockerfile similarity index 98% rename from src/ci/docker/disabled/aarch64-gnu/Dockerfile rename to src/ci/docker/host-x86_64/disabled/aarch64-gnu/Dockerfile index 9dd0435ac4f..e30d7a7dcf9 100644 --- a/src/ci/docker/disabled/aarch64-gnu/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/aarch64-gnu/Dockerfile @@ -31,7 +31,7 @@ WORKDIR /build # The `config` config file was a previously generated config file for # the kernel. This file was generated by running `make defconfig` # followed by `make menuconfig` and then enabling the IPv6 protocol page. -COPY aarch64-gnu/config /build/.config +COPY host-x86_64/aarch64-gnu/config /build/.config RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \ tar xJf - && \ cd /build/linux-4.4.42 && \ diff --git a/src/ci/docker/disabled/aarch64-gnu/config b/src/ci/docker/host-x86_64/disabled/aarch64-gnu/config similarity index 100% rename from src/ci/docker/disabled/aarch64-gnu/config rename to src/ci/docker/host-x86_64/disabled/aarch64-gnu/config diff --git a/src/ci/docker/disabled/asmjs/Dockerfile b/src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile similarity index 100% rename from src/ci/docker/disabled/asmjs/Dockerfile rename to src/ci/docker/host-x86_64/disabled/asmjs/Dockerfile diff --git a/src/ci/docker/disabled/dist-aarch64-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-aarch64-android/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-aarch64-android/Dockerfile diff --git a/src/ci/docker/disabled/dist-armv7-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-armv7-android/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-armv7-android/Dockerfile diff --git a/src/ci/docker/disabled/dist-i686-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-i686-android/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-i686-android/Dockerfile diff --git a/src/ci/docker/disabled/dist-powerpcspe-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-powerpcspe-linux/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-powerpcspe-linux/Dockerfile diff --git a/src/ci/docker/disabled/dist-sparc64-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-sparc64-linux/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-sparc64-linux/Dockerfile diff --git a/src/ci/docker/disabled/dist-x86_64-android/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-android/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-android/Dockerfile diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile similarity index 84% rename from src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile index 5b7196c573c..5e743f0818a 100644 --- a/src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/Dockerfile @@ -18,8 +18,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config -COPY dist-x86_64-dragonfly/build-toolchain.sh /tmp/ -COPY dist-x86_64-dragonfly/patch-toolchain /tmp/ +COPY host-x86_64/dist-x86_64-dragonfly/build-toolchain.sh /tmp/ +COPY host-x86_64/dist-x86_64-dragonfly/patch-toolchain /tmp/ RUN /tmp/build-toolchain.sh /tmp/patch-toolchain COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/build-toolchain.sh diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/patch-toolchain b/src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/patch-toolchain similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-dragonfly/patch-toolchain rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-dragonfly/patch-toolchain diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile similarity index 80% rename from src/ci/docker/disabled/dist-x86_64-haiku/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile index 5b65335bfe4..61b3179d55f 100644 --- a/src/ci/docker/disabled/dist-x86_64-haiku/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile @@ -25,15 +25,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ xz-utils \ zlib1g-dev -COPY dist-x86_64-haiku/llvm-config.sh /bin/llvm-config-haiku +COPY host-x86_64/dist-x86_64-haiku/llvm-config.sh /bin/llvm-config-haiku ENV ARCH=x86_64 WORKDIR /tmp -COPY dist-x86_64-haiku/build-toolchain.sh /tmp/ +COPY host-x86_64/dist-x86_64-haiku/build-toolchain.sh /tmp/ RUN /tmp/build-toolchain.sh $ARCH -COPY dist-x86_64-haiku/fetch-packages.sh /tmp/ +COPY host-x86_64/dist-x86_64-haiku/fetch-packages.sh /tmp/ RUN /tmp/fetch-packages.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/build-toolchain.sh diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/fetch-packages.sh similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/fetch-packages.sh diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/llvm-config.sh b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/llvm-config.sh similarity index 100% rename from src/ci/docker/disabled/dist-x86_64-haiku/llvm-config.sh rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/llvm-config.sh diff --git a/src/ci/docker/disabled/dist-x86_64-redox/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-redox/Dockerfile similarity index 89% rename from src/ci/docker/disabled/dist-x86_64-redox/Dockerfile rename to src/ci/docker/host-x86_64/disabled/dist-x86_64-redox/Dockerfile index 7b53e73d700..b32c498c74e 100644 --- a/src/ci/docker/disabled/dist-x86_64-redox/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-redox/Dockerfile @@ -7,7 +7,7 @@ COPY scripts/crosstool-ng.sh /scripts/ RUN sh /scripts/crosstool-ng.sh WORKDIR /tmp -COPY dist-various-1/install-x86_64-redox.sh /scripts/ +COPY host-x86_64/dist-various-1/install-x86_64-redox.sh /scripts/ RUN sh /scripts/install-x86_64-redox.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch similarity index 100% rename from src/ci/docker/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch rename to src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch diff --git a/src/ci/docker/disabled/riscv64gc-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile similarity index 95% rename from src/ci/docker/disabled/riscv64gc-linux/Dockerfile rename to src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile index f21dc2ba309..40c02ba6510 100644 --- a/src/ci/docker/disabled/riscv64gc-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile @@ -31,7 +31,7 @@ ENV CROSS_COMPILE=riscv64-linux-gnu- WORKDIR /build # From https://github.com/michaeljclark/busybear-linux/blob/master/conf/linux.config -COPY riscv64gc-linux/linux.config /build +COPY host-x86_64/riscv64gc-linux/linux.config /build # Compile the kernel that we're going to be emulating with. This is # basically just done to be compatible with the QEMU target that we're going @@ -48,7 +48,7 @@ RUN rm -rf linux-5.6.16 # binary which we will boot into. Only trick here is configuring busybox to # build static binaries. RUN curl https://busybox.net/downloads/busybox-1.31.1.tar.bz2 | tar xjf - -COPY riscv64gc-linux/0001-Remove-stime-function-calls.patch /build/busybox-1.31.1/ +COPY host-x86_64/riscv64gc-linux/0001-Remove-stime-function-calls.patch /build/busybox-1.31.1/ RUN cd /build/busybox-1.31.1 && \ patch -p1 -i 0001-Remove-stime-function-calls.patch && \ make defconfig && \ diff --git a/src/ci/docker/disabled/riscv64gc-linux/linux.config b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/linux.config similarity index 100% rename from src/ci/docker/disabled/riscv64gc-linux/linux.config rename to src/ci/docker/host-x86_64/disabled/riscv64gc-linux/linux.config diff --git a/src/ci/docker/dist-aarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile similarity index 90% rename from src/ci/docker/dist-aarch64-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile index fd764965ef2..df65f9df441 100644 --- a/src/ci/docker/dist-aarch64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile @@ -16,7 +16,7 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-aarch64-linux/aarch64-linux-gnu.config dist-aarch64-linux/build-toolchains.sh /tmp/ +COPY host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.config host-x86_64/dist-aarch64-linux/build-toolchains.sh /tmp/ RUN ./build-toolchains.sh USER root diff --git a/src/ci/docker/dist-aarch64-linux/aarch64-linux-gnu.config b/src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.config similarity index 100% rename from src/ci/docker/dist-aarch64-linux/aarch64-linux-gnu.config rename to src/ci/docker/host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.config diff --git a/src/ci/docker/dist-aarch64-linux/build-toolchains.sh b/src/ci/docker/host-x86_64/dist-aarch64-linux/build-toolchains.sh similarity index 100% rename from src/ci/docker/dist-aarch64-linux/build-toolchains.sh rename to src/ci/docker/host-x86_64/dist-aarch64-linux/build-toolchains.sh diff --git a/src/ci/docker/dist-android/Dockerfile b/src/ci/docker/host-x86_64/dist-android/Dockerfile similarity index 100% rename from src/ci/docker/dist-android/Dockerfile rename to src/ci/docker/host-x86_64/dist-android/Dockerfile diff --git a/src/ci/docker/dist-arm-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile similarity index 87% rename from src/ci/docker/dist-arm-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile index 06870a8a982..ba93f6ad824 100644 --- a/src/ci/docker/dist-arm-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile @@ -11,7 +11,7 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-arm-linux/arm-linux-gnueabi.config dist-arm-linux/build-toolchains.sh /tmp/ +COPY host-x86_64/dist-arm-linux/arm-linux-gnueabi.config host-x86_64/dist-arm-linux/build-toolchains.sh /tmp/ RUN ./build-toolchains.sh USER root diff --git a/src/ci/docker/dist-arm-linux/arm-linux-gnueabi.config b/src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config similarity index 100% rename from src/ci/docker/dist-arm-linux/arm-linux-gnueabi.config rename to src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config diff --git a/src/ci/docker/dist-arm-linux/build-toolchains.sh b/src/ci/docker/host-x86_64/dist-arm-linux/build-toolchains.sh similarity index 100% rename from src/ci/docker/dist-arm-linux/build-toolchains.sh rename to src/ci/docker/host-x86_64/dist-arm-linux/build-toolchains.sh diff --git a/src/ci/docker/dist-armhf-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile similarity index 87% rename from src/ci/docker/dist-armhf-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile index 155dd848914..977ef08c274 100644 --- a/src/ci/docker/dist-armhf-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile @@ -11,7 +11,7 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-armhf-linux/arm-linux-gnueabihf.config dist-armhf-linux/build-toolchains.sh /tmp/ +COPY host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config host-x86_64/dist-armhf-linux/build-toolchains.sh /tmp/ RUN ./build-toolchains.sh USER root diff --git a/src/ci/docker/dist-armhf-linux/arm-linux-gnueabihf.config b/src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config similarity index 100% rename from src/ci/docker/dist-armhf-linux/arm-linux-gnueabihf.config rename to src/ci/docker/host-x86_64/dist-armhf-linux/arm-linux-gnueabihf.config diff --git a/src/ci/docker/dist-armhf-linux/build-toolchains.sh b/src/ci/docker/host-x86_64/dist-armhf-linux/build-toolchains.sh similarity index 100% rename from src/ci/docker/dist-armhf-linux/build-toolchains.sh rename to src/ci/docker/host-x86_64/dist-armhf-linux/build-toolchains.sh diff --git a/src/ci/docker/dist-armv7-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile similarity index 87% rename from src/ci/docker/dist-armv7-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile index 649049da5df..65d713359d9 100644 --- a/src/ci/docker/dist-armv7-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile @@ -11,7 +11,7 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-armv7-linux/build-toolchains.sh dist-armv7-linux/armv7-linux-gnueabihf.config /tmp/ +COPY host-x86_64/dist-armv7-linux/build-toolchains.sh host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config /tmp/ RUN ./build-toolchains.sh USER root diff --git a/src/ci/docker/dist-armv7-linux/armv7-linux-gnueabihf.config b/src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config similarity index 100% rename from src/ci/docker/dist-armv7-linux/armv7-linux-gnueabihf.config rename to src/ci/docker/host-x86_64/dist-armv7-linux/armv7-linux-gnueabihf.config diff --git a/src/ci/docker/dist-armv7-linux/build-toolchains.sh b/src/ci/docker/host-x86_64/dist-armv7-linux/build-toolchains.sh similarity index 100% rename from src/ci/docker/dist-armv7-linux/build-toolchains.sh rename to src/ci/docker/host-x86_64/dist-armv7-linux/build-toolchains.sh diff --git a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile similarity index 100% rename from src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile rename to src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile diff --git a/src/ci/docker/dist-i686-freebsd/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-freebsd/Dockerfile similarity index 100% rename from src/ci/docker/dist-i686-freebsd/Dockerfile rename to src/ci/docker/host-x86_64/dist-i686-freebsd/Dockerfile diff --git a/src/ci/docker/dist-i686-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile similarity index 84% rename from src/ci/docker/dist-i686-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile index ad675830b77..eac0ed24d50 100644 --- a/src/ci/docker/dist-i686-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile @@ -29,13 +29,13 @@ ENV PATH=/rustroot/bin:$PATH ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp -COPY dist-x86_64-linux/shared.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ # We need a build of openssl which supports SNI to download artifacts from # static.rust-lang.org. This'll be used to link into libcurl below (and used # later as well), so build a copy of OpenSSL with dynamic libraries into our # generic root. -COPY dist-x86_64-linux/build-openssl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-openssl.sh /tmp/ RUN ./build-openssl.sh # The `curl` binary on CentOS doesn't support SNI which is needed for fetching @@ -44,48 +44,48 @@ RUN ./build-openssl.sh # # Note that we also disable a bunch of optional features of curl that we don't # really need. -COPY dist-x86_64-linux/build-curl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-curl.sh /tmp/ RUN ./build-curl.sh # binutils < 2.22 has a bug where the 32-bit executables it generates # immediately segfault in Rust, so we need to install our own binutils. # # See https://github.com/rust-lang/rust/issues/20440 for more info -COPY dist-x86_64-linux/build-binutils.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-binutils.sh /tmp/ RUN ./build-binutils.sh # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS # only has 2.6.4, so build our own -COPY dist-x86_64-linux/build-cmake.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh # Need a newer version of gcc than centos has to compile LLVM nowadays -COPY dist-x86_64-linux/build-gcc.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+ -COPY dist-x86_64-linux/build-python.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ RUN ./build-python.sh # Now build LLVM+Clang 7, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY dist-x86_64-linux/build-clang.sh dist-x86_64-linux/llvm-project-centos.patch /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-clang.sh host-x86_64/dist-x86_64-linux/llvm-project-centos.patch /tmp/ RUN ./build-clang.sh ENV CC=clang CXX=clang++ # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for # cloning, so download and build it here. -COPY dist-x86_64-linux/build-git.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-git.sh /tmp/ RUN ./build-git.sh # for sanitizers, we need kernel headers files newer than the ones CentOS ships # with so we install newer ones here -COPY dist-x86_64-linux/build-headers.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-headers.sh /tmp/ RUN ./build-headers.sh # OpenSSL requires a more recent version of perl # with so we install newer ones here -COPY dist-x86_64-linux/build-perl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-perl.sh /tmp/ RUN ./build-perl.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/dist-mips-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile similarity index 100% rename from src/ci/docker/dist-mips-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-mips-linux/Dockerfile diff --git a/src/ci/docker/dist-mips64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile similarity index 100% rename from src/ci/docker/dist-mips64-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-mips64-linux/Dockerfile diff --git a/src/ci/docker/dist-mips64el-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile similarity index 100% rename from src/ci/docker/dist-mips64el-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-mips64el-linux/Dockerfile diff --git a/src/ci/docker/dist-mipsel-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile similarity index 100% rename from src/ci/docker/dist-mipsel-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-mipsel-linux/Dockerfile diff --git a/src/ci/docker/dist-powerpc-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile similarity index 84% rename from src/ci/docker/dist-powerpc-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile index b8792b0c7fa..651daac8613 100644 --- a/src/ci/docker/dist-powerpc-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc-linux/Dockerfile @@ -16,8 +16,8 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-powerpc-linux/patches/ /tmp/patches/ -COPY dist-powerpc-linux/powerpc-linux-gnu.config dist-powerpc-linux/build-powerpc-toolchain.sh /tmp/ +COPY host-x86_64/dist-powerpc-linux/patches/ /tmp/patches/ +COPY host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config host-x86_64/dist-powerpc-linux/build-powerpc-toolchain.sh /tmp/ RUN ./build-powerpc-toolchain.sh USER root diff --git a/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh b/src/ci/docker/host-x86_64/dist-powerpc-linux/build-powerpc-toolchain.sh similarity index 100% rename from src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh rename to src/ci/docker/host-x86_64/dist-powerpc-linux/build-powerpc-toolchain.sh diff --git a/src/ci/docker/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch b/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch similarity index 100% rename from src/ci/docker/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch rename to src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch diff --git a/src/ci/docker/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch similarity index 100% rename from src/ci/docker/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch rename to src/ci/docker/host-x86_64/dist-powerpc-linux/patches/glibc/2.12.2/002-newer-gcc.patch diff --git a/src/ci/docker/dist-powerpc-linux/powerpc-linux-gnu.config b/src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config similarity index 100% rename from src/ci/docker/dist-powerpc-linux/powerpc-linux-gnu.config rename to src/ci/docker/host-x86_64/dist-powerpc-linux/powerpc-linux-gnu.config diff --git a/src/ci/docker/dist-powerpc64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile similarity index 81% rename from src/ci/docker/dist-powerpc64-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile index a790a143ac5..6ff4d787212 100644 --- a/src/ci/docker/dist-powerpc64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile @@ -17,8 +17,8 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-powerpc64-linux/patches/ /tmp/patches/ -COPY dist-powerpc64-linux/shared.sh dist-powerpc64-linux/powerpc64-linux-gnu.config dist-powerpc64-linux/build-powerpc64-toolchain.sh /tmp/ +COPY host-x86_64/dist-powerpc64-linux/patches/ /tmp/patches/ +COPY host-x86_64/dist-powerpc64-linux/shared.sh host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config host-x86_64/dist-powerpc64-linux/build-powerpc64-toolchain.sh /tmp/ RUN ./build-powerpc64-toolchain.sh USER root diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh b/src/ci/docker/host-x86_64/dist-powerpc64-linux/build-powerpc64-toolchain.sh similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/build-powerpc64-toolchain.sh diff --git a/src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/001-PowerPC-Remove-unnecessary-mnew-mnemonics.patch diff --git a/src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/002-Prevent-inlining-in-PPC64-initfini.s.patch diff --git a/src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/patches/glibc/2.12.2/003-newer-gcc.patch diff --git a/src/ci/docker/dist-powerpc64-linux/powerpc64-linux-gnu.config b/src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/powerpc64-linux-gnu.config rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.config diff --git a/src/ci/docker/dist-powerpc64-linux/shared.sh b/src/ci/docker/host-x86_64/dist-powerpc64-linux/shared.sh similarity index 100% rename from src/ci/docker/dist-powerpc64-linux/shared.sh rename to src/ci/docker/host-x86_64/dist-powerpc64-linux/shared.sh diff --git a/src/ci/docker/dist-powerpc64le-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile similarity index 89% rename from src/ci/docker/dist-powerpc64le-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile index 5c17bc321c1..c1a621ff105 100644 --- a/src/ci/docker/dist-powerpc64le-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile @@ -19,7 +19,7 @@ WORKDIR /tmp USER root RUN apt-get install -y --no-install-recommends rpm2cpio cpio -COPY dist-powerpc64le-linux/shared.sh 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 /tmp/ RUN ./build-powerpc64le-toolchain.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh similarity index 100% rename from src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh rename to src/ci/docker/host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh diff --git a/src/ci/docker/dist-powerpc64le-linux/shared.sh b/src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh similarity index 100% rename from src/ci/docker/dist-powerpc64le-linux/shared.sh rename to src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh diff --git a/src/ci/docker/dist-s390x-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile similarity index 84% rename from src/ci/docker/dist-s390x-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile index 76d29a471c3..1b261993cfc 100644 --- a/src/ci/docker/dist-s390x-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-s390x-linux/Dockerfile @@ -16,8 +16,8 @@ RUN sh /scripts/rustbuild-setup.sh USER rustbuild WORKDIR /tmp -COPY dist-s390x-linux/patches/ /tmp/patches/ -COPY dist-s390x-linux/s390x-linux-gnu.config dist-s390x-linux/build-s390x-toolchain.sh /tmp/ +COPY host-x86_64/dist-s390x-linux/patches/ /tmp/patches/ +COPY host-x86_64/dist-s390x-linux/s390x-linux-gnu.config host-x86_64/dist-s390x-linux/build-s390x-toolchain.sh /tmp/ RUN ./build-s390x-toolchain.sh USER root diff --git a/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh b/src/ci/docker/host-x86_64/dist-s390x-linux/build-s390x-toolchain.sh similarity index 100% rename from src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh rename to src/ci/docker/host-x86_64/dist-s390x-linux/build-s390x-toolchain.sh diff --git a/src/ci/docker/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch b/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch similarity index 100% rename from src/ci/docker/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch rename to src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/001-Use-.machine-to-prevent-AS-from-complaining-about-z9.patch diff --git a/src/ci/docker/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch b/src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch similarity index 100% rename from src/ci/docker/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch rename to src/ci/docker/host-x86_64/dist-s390x-linux/patches/glibc/2.12.2/002-newer-gcc.patch diff --git a/src/ci/docker/dist-s390x-linux/s390x-linux-gnu.config b/src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config similarity index 100% rename from src/ci/docker/dist-s390x-linux/s390x-linux-gnu.config rename to src/ci/docker/host-x86_64/dist-s390x-linux/s390x-linux-gnu.config diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile similarity index 93% rename from src/ci/docker/dist-various-1/Dockerfile rename to src/ci/docker/host-x86_64/dist-various-1/Dockerfile index 35b598e20f0..87bab78f796 100644 --- a/src/ci/docker/dist-various-1/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile @@ -47,7 +47,7 @@ RUN add-apt-repository ppa:team-gcc-arm-embedded/ppa && \ apt-get update && \ apt-get install -y --no-install-recommends gcc-arm-embedded -COPY scripts/rustbuild-setup.sh dist-various-1/build-riscv-toolchain.sh dist-various-1/riscv64-unknown-linux-gnu.config dist-various-1/crosstool-ng.sh /build/ +COPY scripts/rustbuild-setup.sh host-x86_64/dist-various-1/build-riscv-toolchain.sh host-x86_64/dist-various-1/riscv64-unknown-linux-gnu.config host-x86_64/dist-various-1/crosstool-ng.sh /build/ RUN ./crosstool-ng.sh # Crosstool-ng will refuse to build as root @@ -59,19 +59,19 @@ RUN ./build-riscv-toolchain.sh USER root ENV PATH=/x-tools/riscv64-unknown-linux-gnu/bin:$PATH -COPY dist-various-1/build-rumprun.sh /build +COPY host-x86_64/dist-various-1/build-rumprun.sh /build RUN ./build-rumprun.sh -COPY dist-various-1/install-x86_64-redox.sh /build +COPY host-x86_64/dist-various-1/install-x86_64-redox.sh /build RUN ./install-x86_64-redox.sh -COPY dist-various-1/install-mips-musl.sh /build +COPY host-x86_64/dist-various-1/install-mips-musl.sh /build RUN ./install-mips-musl.sh -COPY dist-various-1/install-mipsel-musl.sh /build +COPY host-x86_64/dist-various-1/install-mipsel-musl.sh /build RUN ./install-mipsel-musl.sh -COPY dist-various-1/install-aarch64-none-elf.sh /build +COPY host-x86_64/dist-various-1/install-aarch64-none-elf.sh /build RUN ./install-aarch64-none-elf.sh # Suppress some warnings in the openwrt toolchains we downloaded diff --git a/src/ci/docker/dist-various-1/build-riscv-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-1/build-riscv-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-1/build-riscv-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-1/build-riscv-toolchain.sh diff --git a/src/ci/docker/dist-various-1/build-rumprun.sh b/src/ci/docker/host-x86_64/dist-various-1/build-rumprun.sh similarity index 100% rename from src/ci/docker/dist-various-1/build-rumprun.sh rename to src/ci/docker/host-x86_64/dist-various-1/build-rumprun.sh diff --git a/src/ci/docker/dist-various-1/crosstool-ng.sh b/src/ci/docker/host-x86_64/dist-various-1/crosstool-ng.sh similarity index 100% rename from src/ci/docker/dist-various-1/crosstool-ng.sh rename to src/ci/docker/host-x86_64/dist-various-1/crosstool-ng.sh diff --git a/src/ci/docker/dist-various-1/install-aarch64-none-elf.sh b/src/ci/docker/host-x86_64/dist-various-1/install-aarch64-none-elf.sh similarity index 100% rename from src/ci/docker/dist-various-1/install-aarch64-none-elf.sh rename to src/ci/docker/host-x86_64/dist-various-1/install-aarch64-none-elf.sh diff --git a/src/ci/docker/dist-various-1/install-mips-musl.sh b/src/ci/docker/host-x86_64/dist-various-1/install-mips-musl.sh similarity index 100% rename from src/ci/docker/dist-various-1/install-mips-musl.sh rename to src/ci/docker/host-x86_64/dist-various-1/install-mips-musl.sh diff --git a/src/ci/docker/dist-various-1/install-mipsel-musl.sh b/src/ci/docker/host-x86_64/dist-various-1/install-mipsel-musl.sh similarity index 100% rename from src/ci/docker/dist-various-1/install-mipsel-musl.sh rename to src/ci/docker/host-x86_64/dist-various-1/install-mipsel-musl.sh diff --git a/src/ci/docker/dist-various-1/install-x86_64-redox.sh b/src/ci/docker/host-x86_64/dist-various-1/install-x86_64-redox.sh similarity index 100% rename from src/ci/docker/dist-various-1/install-x86_64-redox.sh rename to src/ci/docker/host-x86_64/dist-various-1/install-x86_64-redox.sh diff --git a/src/ci/docker/dist-various-1/riscv64-unknown-linux-gnu.config b/src/ci/docker/host-x86_64/dist-various-1/riscv64-unknown-linux-gnu.config similarity index 100% rename from src/ci/docker/dist-various-1/riscv64-unknown-linux-gnu.config rename to src/ci/docker/host-x86_64/dist-various-1/riscv64-unknown-linux-gnu.config diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile similarity index 89% rename from src/ci/docker/dist-various-2/Dockerfile rename to src/ci/docker/host-x86_64/dist-various-2/Dockerfile index 1f1c2460023..498b289ae1a 100644 --- a/src/ci/docker/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -60,20 +60,20 @@ RUN env \ rm -rf /build/* WORKDIR /tmp -COPY dist-various-2/shared.sh /tmp/ -COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/ +COPY host-x86_64/dist-various-2/shared.sh /tmp/ +COPY host-x86_64/dist-various-2/build-cloudabi-toolchain.sh /tmp/ RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi -COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/ +COPY host-x86_64/dist-various-2/build-fuchsia-toolchain.sh /tmp/ RUN /tmp/build-fuchsia-toolchain.sh -COPY dist-various-2/build-solaris-toolchain.sh /tmp/ +COPY host-x86_64/dist-various-2/build-solaris-toolchain.sh /tmp/ RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386 RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc -COPY dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/ -COPY dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 +COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/ +COPY host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 RUN ln -s /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 /usr/bin/x86_64-fortanix-unknown-sgx-clang++-11 RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh -COPY dist-various-2/build-wasi-toolchain.sh /tmp/ +COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/ RUN /tmp/build-wasi-toolchain.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-cloudabi-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-2/build-cloudabi-toolchain.sh diff --git a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-fuchsia-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-2/build-fuchsia-toolchain.sh diff --git a/src/ci/docker/dist-various-2/build-solaris-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-solaris-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-2/build-solaris-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-2/build-solaris-toolchain.sh diff --git a/src/ci/docker/dist-various-2/build-wasi-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-2/build-wasi-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh diff --git a/src/ci/docker/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh b/src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh similarity index 100% rename from src/ci/docker/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh rename to src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh diff --git a/src/ci/docker/dist-various-2/shared.sh b/src/ci/docker/host-x86_64/dist-various-2/shared.sh similarity index 100% rename from src/ci/docker/dist-various-2/shared.sh rename to src/ci/docker/host-x86_64/dist-various-2/shared.sh diff --git a/src/ci/docker/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh b/src/ci/docker/host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh similarity index 100% rename from src/ci/docker/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh rename to src/ci/docker/host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh diff --git a/src/ci/docker/dist-x86_64-freebsd/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile similarity index 100% rename from src/ci/docker/dist-x86_64-freebsd/Dockerfile rename to src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile diff --git a/src/ci/docker/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile similarity index 83% rename from src/ci/docker/dist-x86_64-linux/Dockerfile rename to src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index 2f2a10a0e90..8b78214fbdd 100644 --- a/src/ci/docker/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -29,13 +29,13 @@ ENV PATH=/rustroot/bin:$PATH ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig WORKDIR /tmp -COPY dist-x86_64-linux/shared.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/ # We need a build of openssl which supports SNI to download artifacts from # static.rust-lang.org. This'll be used to link into libcurl below (and used # later as well), so build a copy of OpenSSL with dynamic libraries into our # generic root. -COPY dist-x86_64-linux/build-openssl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-openssl.sh /tmp/ RUN ./build-openssl.sh # The `curl` binary on CentOS doesn't support SNI which is needed for fetching @@ -44,48 +44,48 @@ RUN ./build-openssl.sh # # Note that we also disable a bunch of optional features of curl that we don't # really need. -COPY dist-x86_64-linux/build-curl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-curl.sh /tmp/ RUN ./build-curl.sh # binutils < 2.22 has a bug where the 32-bit executables it generates # immediately segfault in Rust, so we need to install our own binutils. # # See https://github.com/rust-lang/rust/issues/20440 for more info -COPY dist-x86_64-linux/build-binutils.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-binutils.sh /tmp/ RUN ./build-binutils.sh # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS # only has 2.6.4, so build our own -COPY dist-x86_64-linux/build-cmake.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/ RUN ./build-cmake.sh # Build a version of gcc capable of building LLVM 6 -COPY dist-x86_64-linux/build-gcc.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/ RUN ./build-gcc.sh # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+ -COPY dist-x86_64-linux/build-python.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/ RUN ./build-python.sh # Now build LLVM+Clang 7, afterwards configuring further compilations to use the # clang/clang++ compilers. -COPY dist-x86_64-linux/build-clang.sh dist-x86_64-linux/llvm-project-centos.patch /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-clang.sh host-x86_64/dist-x86_64-linux/llvm-project-centos.patch /tmp/ RUN ./build-clang.sh ENV CC=clang CXX=clang++ # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for # cloning, so download and build it here. -COPY dist-x86_64-linux/build-git.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-git.sh /tmp/ RUN ./build-git.sh # for sanitizers, we need kernel headers files newer than the ones CentOS ships # with so we install newer ones here -COPY dist-x86_64-linux/build-headers.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-headers.sh /tmp/ RUN ./build-headers.sh # OpenSSL requires a more recent version of perl # with so we install newer ones here -COPY dist-x86_64-linux/build-perl.sh /tmp/ +COPY host-x86_64/dist-x86_64-linux/build-perl.sh /tmp/ RUN ./build-perl.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/dist-x86_64-linux/build-binutils.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-binutils.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-binutils.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-binutils.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-clang.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-clang.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-cmake.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-cmake.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-cmake.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-cmake.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-curl.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-curl.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-curl.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-curl.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-gcc.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-git.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-git.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-git.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-git.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-headers.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-headers.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-headers.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-headers.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-openssl.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-openssl.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-openssl.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-openssl.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-perl.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-perl.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-perl.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-perl.sh diff --git a/src/ci/docker/dist-x86_64-linux/build-python.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/build-python.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh diff --git a/src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch b/src/ci/docker/host-x86_64/dist-x86_64-linux/llvm-project-centos.patch similarity index 100% rename from src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch rename to src/ci/docker/host-x86_64/dist-x86_64-linux/llvm-project-centos.patch diff --git a/src/ci/docker/dist-x86_64-linux/shared.sh b/src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh similarity index 100% rename from src/ci/docker/dist-x86_64-linux/shared.sh rename to src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile similarity index 100% rename from src/ci/docker/dist-x86_64-musl/Dockerfile rename to src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile diff --git a/src/ci/docker/dist-x86_64-netbsd/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile similarity index 89% rename from src/ci/docker/dist-x86_64-netbsd/Dockerfile rename to src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile index 135bb33cef7..f3f7255f154 100644 --- a/src/ci/docker/dist-x86_64-netbsd/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:16.04 COPY scripts/cross-apt-packages.sh /scripts/ RUN sh /scripts/cross-apt-packages.sh -COPY dist-x86_64-netbsd/build-netbsd-toolchain.sh /tmp/ +COPY host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh /tmp/ RUN /tmp/build-netbsd-toolchain.sh COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh b/src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh similarity index 100% rename from src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh rename to src/ci/docker/host-x86_64/dist-x86_64-netbsd/build-netbsd-toolchain.sh diff --git a/src/ci/docker/i686-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile similarity index 100% rename from src/ci/docker/i686-gnu-nopt/Dockerfile rename to src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile diff --git a/src/ci/docker/i686-gnu/Dockerfile b/src/ci/docker/host-x86_64/i686-gnu/Dockerfile similarity index 100% rename from src/ci/docker/i686-gnu/Dockerfile rename to src/ci/docker/host-x86_64/i686-gnu/Dockerfile diff --git a/src/ci/docker/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile similarity index 92% rename from src/ci/docker/mingw-check/Dockerfile rename to src/ci/docker/host-x86_64/mingw-check/Dockerfile index 97e4d3fd749..e9570e8425e 100644 --- a/src/ci/docker/mingw-check/Dockerfile +++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY mingw-check/validate-toolstate.sh /scripts/ +COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1 ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors && \ diff --git a/src/ci/docker/mingw-check/validate-toolstate.sh b/src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh similarity index 100% rename from src/ci/docker/mingw-check/validate-toolstate.sh rename to src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh diff --git a/src/ci/docker/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile similarity index 100% rename from src/ci/docker/test-various/Dockerfile rename to src/ci/docker/host-x86_64/test-various/Dockerfile diff --git a/src/ci/docker/wasm32/Dockerfile b/src/ci/docker/host-x86_64/wasm32/Dockerfile similarity index 100% rename from src/ci/docker/wasm32/Dockerfile rename to src/ci/docker/host-x86_64/wasm32/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-aux/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-aux/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-debug/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-debug/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-distcheck/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-distcheck/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-full-bootstrap/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-full-bootstrap/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-llvm-8/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-llvm-8/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-nopt/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu-nopt/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile diff --git a/src/ci/docker/x86_64-gnu-tools/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile similarity index 89% rename from src/ci/docker/x86_64-gnu-tools/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile index 3b6e4c2cb98..ef17f0507ab 100644 --- a/src/ci/docker/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -COPY x86_64-gnu-tools/checktools.sh /tmp/ +COPY host-x86_64/x86_64-gnu-tools/checktools.sh /tmp/ ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh similarity index 100% rename from src/ci/docker/x86_64-gnu-tools/checktools.sh rename to src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh diff --git a/src/ci/docker/x86_64-gnu/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile similarity index 100% rename from src/ci/docker/x86_64-gnu/Dockerfile rename to src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index 8071b635804..56fe57d32de 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -27,8 +27,9 @@ do shift done -docker_dir="`dirname $script`" -ci_dir="`dirname $docker_dir`" +script_dir="`dirname $script`" +docker_dir="${script_dir}/host-$(uname -m)" +ci_dir="`dirname $script_dir`" src_dir="`dirname $ci_dir`" root_dir="`dirname $src_dir`" @@ -51,7 +52,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then rm -f "$copied_files" for i in $(sed -n -e 's/^COPY \(.*\) .*$/\1/p' "$docker_dir/$image/Dockerfile"); do # List the file names - find "$docker_dir/$i" -type f >> $copied_files + find "$script_dir/$i" -type f >> $copied_files done # Sort the file names and cat the content into the hash key sort $copied_files | xargs cat >> $hash_key @@ -73,10 +74,10 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then dockerfile="$docker_dir/$image/Dockerfile" if [ -x /usr/bin/cygpath ]; then - context="`cygpath -w $docker_dir`" + context="`cygpath -w $script_dir`" dockerfile="`cygpath -w $dockerfile`" else - context="$docker_dir" + context="$script_dir" fi retry docker \ build \ diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 00170226e63..0614d5e31d1 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -495,7 +495,7 @@ jobs: - name: x86_64-msvc-tools env: - SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows + SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json <<: *job-windows-xl