]> git.lizzy.rs Git - rust.git/commitdiff
Build cmake earlier on dist-x86_64-musl
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 28 Feb 2021 19:52:44 +0000 (20:52 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 1 Mar 2021 22:35:35 +0000 (23:35 +0100)
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.

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

index d779e8d7b5d5a66a1a8d13f6676a0efc85bdce0c..08f07eb8284062f6a4d1548ac852642c197d6a94 100644 (file)
@@ -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 \