Skip to content

Commit c4e6fe9

Browse files
committed
Auto merge of #113714 - Kobzol:ci-cmake, r=nikic
CI: build CMake 3.20 to support LLVM 17 LLVM 17 will require CMake at least 3.20, so we have to go back to building our own CMake on the Linux x64 dist builder. r? `@nikic`
2 parents b3c7a7e + e95caa7 commit c4e6fe9

File tree

17 files changed

+55
-4
lines changed

17 files changed

+55
-4
lines changed

compiler/rustc_llvm/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ fn main() {
251251
} else if target.contains("windows-gnu") {
252252
println!("cargo:rustc-link-lib=shell32");
253253
println!("cargo:rustc-link-lib=uuid");
254-
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
254+
} else if target.contains("haiku") || target.contains("darwin") {
255255
println!("cargo:rustc-link-lib=z");
256+
} else if target.contains("netbsd") {
257+
println!("cargo:rustc-link-lib=z");
258+
println!("cargo:rustc-link-lib=execinfo");
256259
}
257260
cmd.args(&components);
258261

src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
1717
xz-utils \
1818
&& rm -rf /var/lib/apt/lists/*
1919

20+
COPY scripts/cmake.sh /scripts/
21+
RUN /scripts/cmake.sh
22+
2023
COPY scripts/sccache.sh /scripts/
2124
RUN sh /scripts/sccache.sh
2225

src/ci/docker/host-x86_64/armhf-gnu/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-
1313
git \
1414
libc6-dev \
1515
libc6-dev-armhf-cross \
16+
libssl-dev \
1617
make \
1718
ninja-build \
1819
python3 \
@@ -75,6 +76,9 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
7576
# Source of the file: https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb
7677
RUN curl -O https://ci-mirrors.rust-lang.org/rustc/vexpress-v2p-ca15-tc1.dtb
7778

79+
COPY scripts/cmake.sh /scripts/
80+
RUN /scripts/cmake.sh
81+
7882
COPY scripts/sccache.sh /scripts/
7983
RUN sh /scripts/sccache.sh
8084

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
libssl-dev \
1717
pkg-config
1818

19+
COPY scripts/cmake.sh /scripts/
20+
RUN /scripts/cmake.sh
1921

2022
COPY scripts/sccache.sh /scripts/
2123
RUN sh /scripts/sccache.sh

src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
1919
g++ \
2020
libc6-dev \
2121
libc6-dev-riscv64-cross \
22+
libssl-dev \
2223
make \
2324
ninja-build \
2425
patch \
@@ -94,6 +95,9 @@ RUN mkdir build && cd build && \
9495
WORKDIR /tmp
9596
RUN rm -rf /tmp/riscv-pk
9697

98+
COPY scripts/cmake.sh /scripts/
99+
RUN /scripts/cmake.sh
100+
97101
COPY scripts/sccache.sh /scripts/
98102
RUN sh /scripts/sccache.sh
99103

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
4848
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
4949
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
5050

51+
COPY scripts/cmake.sh /tmp/
52+
RUN ./cmake.sh
53+
5154
# Now build LLVM+Clang, afterwards configuring further compilations to use the
5255
# clang/clang++ compilers.
5356
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ RUN apt-get install -y --no-install-recommends rpm2cpio cpio
1414
COPY host-x86_64/dist-powerpc64le-linux/shared.sh host-x86_64/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh /tmp/
1515
RUN ./build-powerpc64le-toolchain.sh
1616

17+
COPY scripts/cmake.sh /scripts/
18+
RUN /scripts/cmake.sh
19+
1720
COPY scripts/sccache.sh /scripts/
1821
RUN sh /scripts/sccache.sh
1922

src/ci/docker/host-x86_64/dist-various-1/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ ENV SCRIPT \
186186
python3 ../x.py --stage 2 test --host='' --target $RUN_MAKE_TARGETS tests/run-make && \
187187
python3 ../x.py dist --host='' --target $TARGETS
188188

189+
COPY scripts/cmake.sh /scripts/
190+
RUN /scripts/cmake.sh
191+
189192
# sccache
190193
COPY scripts/sccache.sh /scripts/
191194
RUN sh /scripts/sccache.sh

src/ci/docker/host-x86_64/dist-various-2/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ RUN /tmp/build-wasi-toolchain.sh
9696
COPY scripts/freebsd-toolchain.sh /tmp/
9797
RUN /tmp/freebsd-toolchain.sh i686
9898

99+
COPY scripts/cmake.sh /scripts/
100+
RUN /scripts/cmake.sh
101+
99102
COPY scripts/sccache.sh /scripts/
100103
RUN sh /scripts/sccache.sh
101104

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ COPY host-x86_64/dist-x86_64-linux/shared.sh /tmp/
4848
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
4949
RUN ./build-gcc.sh && yum remove -y gcc gcc-c++
5050

51+
# LLVM 17 needs cmake 3.20 or higher.
52+
COPY scripts/cmake.sh /tmp/
53+
RUN ./cmake.sh
54+
5155
# Now build LLVM+Clang, afterwards configuring further compilations to use the
5256
# clang/clang++ compilers.
5357
COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/

0 commit comments

Comments
 (0)