Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit e3233ef

Browse files
committed
Build gcc first.
The gcc build step takes by far the longest, and we don't expect to update it as often as later dependencies. So we trade the improved security of using a newer-than-system openssl and curl to download source for the convenience of faster rebuilds by making it more likely the gcc build will be in docker's cache.
1 parent a563ec3 commit e3233ef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

slaves/dist/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ RUN mkdir /buildslave && chown rustbuild:rustbuild /buildslave
2424
RUN mkdir /home/rustbuild
2525
RUN chown rustbuild:rustbuild /home/rustbuild
2626

27+
# Install gcc 4.7 which has C++11 support which is required by LLVM
28+
#
29+
# After we're done building we erase the binutils/gcc installs from CentOS to
30+
# ensure that we always use the ones that we just built.
31+
COPY dist/build_gcc.sh /build/
32+
RUN sh build_gcc.sh && rm -rf /build
33+
2734
# We need a build of openssl which supports SNI to download artifacts from
2835
# static.rust-lang.org. This'll be used to link into libcurl below (and used
2936
# later as well), so build a copy of OpenSSL with dynamic libraries into our
@@ -40,13 +47,6 @@ RUN sh build_openssl.sh && rm -rf /build
4047
COPY dist/build_curl.sh /build/
4148
RUN sh build_curl.sh
4249

43-
# Install gcc 4.7 which has C++11 support which is required by LLVM
44-
#
45-
# After we're done building we erase the binutils/gcc installs from CentOS to
46-
# ensure that we always use the ones that we just built.
47-
COPY dist/build_gcc.sh /build/
48-
RUN sh build_gcc.sh && rm -rf /build
49-
5050
# binutils < 2.22 has a bug where the 32-bit executables it generates
5151
# immediately segfault in Rust, so we need to install our own binutils.
5252
#

0 commit comments

Comments
 (0)