about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-28 20:52:44 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-03-01 23:35:35 +0100
commitea0aa8def379657559419a4dd2707e3bc60512b8 (patch)
treeb80d870f18ea89d7ee6ca9f54e6d493d888d7875 /src/ci/docker
parent34352d441a6430b5b85029efc0569a88999b2ac8 (diff)
downloadrust-ea0aa8def379657559419a4dd2707e3bc60512b8.tar.gz
rust-ea0aa8def379657559419a4dd2707e3bc60512b8.zip
Build cmake earlier on dist-x86_64-musl
musl-toolchain.sh is called with REPLACE_CC=1, so it will replace
the host compiler and the subsequent cmake build will fail because
it cannot find the openssl headers.

Move the cmake build earlier, so it happens before the compiler
is replaced.
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
index d779e8d7b5d..08f07eb8284 100644
--- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 
 WORKDIR /build/
 
+# Build cmake before musl toolchain, as we replace the compiler during that step.
+COPY scripts/cmake.sh /scripts/
+RUN /scripts/cmake.sh
+
 COPY scripts/musl-toolchain.sh /build/
 # We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
 RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
@@ -29,9 +33,6 @@ RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
-COPY scripts/cmake.sh /scripts/
-RUN /scripts/cmake.sh
-
 ENV HOSTS=x86_64-unknown-linux-musl
 
 ENV RUST_CONFIGURE_ARGS \