Skip to content

Commit 9ba34f8

Browse files
committed
ci: Organise shared helper scripts
Move shared helper scripts used by Docker builds under docker/scripts.
1 parent dce8c06 commit 9ba34f8

File tree

17 files changed

+41
-200
lines changed

17 files changed

+41
-200
lines changed

src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib
4343
ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
4444
WORKDIR /tmp
4545
RUN mkdir /home/user
46-
COPY host-aarch64/dist-aarch64-linux/shared.sh /tmp/
46+
COPY scripts/shared.sh /tmp/
4747

4848
# Need at least GCC 5.1 to compile LLVM
49-
COPY host-aarch64/dist-aarch64-linux/build-gcc.sh /tmp/
49+
COPY scripts/build-gcc.sh /tmp/
50+
ENV GCC_VERSION=9.5.0
51+
ENV GCC_BUILD_TARGET=aarch64-unknown-linux-gnu
5052
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
5153

5254
ENV CC=gcc CXX=g++
@@ -56,12 +58,13 @@ COPY scripts/cmake.sh /tmp/
5658
RUN ./cmake.sh
5759

5860
# Build LLVM+Clang
59-
COPY host-aarch64/dist-aarch64-linux/build-clang.sh /tmp/
61+
COPY scripts/build-clang.sh /tmp/
62+
ENV LLVM_BUILD_TARGETS=AArch64
6063
RUN ./build-clang.sh
6164
ENV CC=clang CXX=clang++
6265

6366
# Build zstd to enable `llvm.libzstd`.
64-
COPY host-aarch64/dist-aarch64-linux/build-zstd.sh /tmp/
67+
COPY scripts/build-zstd.sh /tmp/
6568
RUN ./build-zstd.sh
6669

6770
COPY scripts/sccache.sh /scripts/
@@ -82,7 +85,7 @@ ENV RUST_CONFIGURE_ARGS \
8285
--set target.aarch64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \
8386
--set target.aarch64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
8487
--set llvm.link-shared=true \
85-
--set llvm.thin-lto=false \
88+
--set llvm.thin-lto=true \
8689
--set llvm.libzstd=true \
8790
--set llvm.ninja=false \
8891
--set rust.debug-assertions=false \
@@ -93,6 +96,5 @@ ENV RUST_CONFIGURE_ARGS \
9396
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
9497

9598
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang
96-
ENV DIST_SRC 1
9799
ENV LIBCURL_NO_PKG_CONFIG 1
98100
ENV DIST_REQUIRE_ALL_TOOLS 1

src/ci/docker/host-aarch64/dist-aarch64-linux/build-clang.sh

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/ci/docker/host-aarch64/dist-aarch64-linux/build-gcc.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/ci/docker/host-aarch64/dist-aarch64-linux/shared.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN yum upgrade -y && \
1919
gcc \
2020
gcc-c++ \
2121
git \
22+
binutils.i686 \
2223
glibc-devel.i686 \
2324
glibc-devel.x86_64 \
2425
libedit-devel \
@@ -46,19 +47,21 @@ ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib32:/rustroot/lib
4647
ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
4748
WORKDIR /tmp
4849
RUN mkdir /home/user
49-
COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
50+
COPY scripts/shared.sh /tmp/
5051

5152
# Need at least GCC 5.1 to compile LLVM nowadays
52-
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
53+
COPY scripts/build-gcc.sh /tmp/
5354
ENV GCC_VERSION=9.5.0
55+
ENV GCC_BUILD_TARGET=i686-pc-linux-gnu
5456
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
5557

5658
COPY scripts/cmake.sh /tmp/
5759
RUN ./cmake.sh
5860

5961
# Now build LLVM+Clang, afterwards configuring further compilations to use the
6062
# clang/clang++ compilers.
61-
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
63+
COPY scripts/build-clang.sh /tmp/
64+
ENV LLVM_BUILD_TARGETS=X86
6265
RUN ./build-clang.sh
6366
ENV CC=clang CXX=clang++
6467

src/ci/docker/host-x86_64/dist-powerpc64le-linux/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN /scripts/crosstool-ng-build.sh
1818
WORKDIR /build
1919

2020
RUN apt-get install -y --no-install-recommends rpm2cpio cpio
21-
COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/
21+
COPY scripts/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /build/
2222
RUN ./build-powerpc64le-toolchain.sh
2323

2424
COPY scripts/sccache.sh /scripts/

src/ci/docker/host-x86_64/dist-powerpc64le-linux/shared.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
4747
# Clang needs to access GCC headers to enable linker plugin LTO
4848
WORKDIR /tmp
4949
RUN mkdir /home/user
50-
COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
50+
COPY scripts/shared.sh /tmp/
5151

5252
# Need at least GCC 5.1 to compile LLVM nowadays
53-
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
53+
COPY scripts/build-gcc.sh /tmp/
5454
ENV GCC_VERSION=9.5.0
55+
ENV GCC_BUILD_TARGET=x86_64-pc-linux-gnu
5556
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
5657

5758
# LLVM 17 needs cmake 3.20 or higher.
@@ -60,12 +61,13 @@ RUN ./cmake.sh
6061

6162
# Now build LLVM+Clang, afterwards configuring further compilations to use the
6263
# clang/clang++ compilers.
63-
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
64+
COPY scripts/build-clang.sh /tmp/
65+
ENV LLVM_BUILD_TARGETS=X86
6466
RUN ./build-clang.sh
6567
ENV CC=clang CXX=clang++
6668

6769
# Build zstd to enable `llvm.libzstd`.
68-
COPY host-x86_64/dist-x86_64-linux/build-zstd.sh /tmp/
70+
COPY scripts/build-zstd.sh /tmp/
6971
RUN ./build-zstd.sh
7072

7173
COPY scripts/sccache.sh /scripts/

src/ci/docker/host-x86_64/dist-x86_64-linux/build-zstd.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/ci/docker/host-x86_64/dist-x86_64-linux/shared.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)