about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2018-01-16 22:23:18 +0100
committerEd Schouten <ed@nuxi.nl>2018-01-16 22:23:18 +0100
commitae4288f9ffd2fd431dba04a5906b5304e9106755 (patch)
tree115a695ee5b4c25b426c4291f2f1c672b0386734 /src/ci/docker
parent5801f95cbc2183285bc4423b3405f2767e448ef6 (diff)
downloadrust-ae4288f9ffd2fd431dba04a5906b5304e9106755.tar.gz
rust-ae4288f9ffd2fd431dba04a5906b5304e9106755.zip
Integrate dist-cloudabi into dist-various-2.
As discussed in #47427, let's not have a separate container for doing
CloudABI builds. It's a lot faster if we integrate it into an existing
container, so there's less duplication of what's being built.

Upgrade the existing container to Ubuntu 17.10, which is required for
CloudABI builds. The version of Clang shipped with 16.04 is not recent
enough to support CloudABI properly.
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/disabled/dist-cloudabi/Dockerfile30
-rw-r--r--src/ci/docker/dist-various-2/Dockerfile29
-rwxr-xr-xsrc/ci/docker/dist-various-2/build-cloudabi-toolchain.sh (renamed from src/ci/docker/scripts/cloudabi-toolchain.sh)32
3 files changed, 40 insertions, 51 deletions
diff --git a/src/ci/docker/disabled/dist-cloudabi/Dockerfile b/src/ci/docker/disabled/dist-cloudabi/Dockerfile
deleted file mode 100644
index f1f6f0ff6ca..00000000000
--- a/src/ci/docker/disabled/dist-cloudabi/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-FROM ubuntu:17.10
-
-ENV TARGETS=aarch64-unknown-cloudabi
-# FIXME(EdSchouten): Enable ARMv7 support once libc ≥0.2.37 has been merged.
-# ENV TARGETS=armv7-unknown-cloudabi-eabihf
-ENV TARGETS=$TARGETS,i686-unknown-cloudabi
-ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
-
-COPY scripts/cloudabi-toolchain.sh /tmp/
-RUN /tmp/cloudabi-toolchain.sh
-
-COPY scripts/sccache.sh /scripts/
-RUN sh /scripts/sccache.sh
-
-# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It can
-# automatically pick the right compiler path.
-ENV \
-    AR_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-ar \
-    CC_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-clang \
-    CXX_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-clang++ \
-    AR_i686_unknown_cloudabi=i686-unknown-cloudabi-ar \
-    CC_i686_unknown_cloudabi=i686-unknown-cloudabi-clang \
-    CXX_i686_unknown_cloudabi=i686-unknown-cloudabi-clang++ \
-    AR_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-ar \
-    CC_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang \
-    CXX_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang++
-
-# FIXME(EdSchouten): Work towards being able to run 'x.py test'.
-ENV RUST_CONFIGURE_ARGS --target=${TARGETS} --disable-jemalloc
-ENV SCRIPT python2.7 /checkout/x.py dist --target ${TARGETS}
diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/dist-various-2/Dockerfile
index c7885db559a..5284a1c875c 100644
--- a/src/ci/docker/dist-various-2/Dockerfile
+++ b/src/ci/docker/dist-various-2/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM ubuntu:17.10
 
 COPY scripts/cross-apt-packages.sh /scripts/
 RUN sh /scripts/cross-apt-packages.sh
@@ -21,9 +21,14 @@ RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7
 RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'
 
 WORKDIR /tmp
-COPY dist-various-2/shared.sh dist-various-2/build-fuchsia-toolchain.sh /tmp/
-COPY dist-various-2/build-solaris-toolchain.sh /tmp/
+COPY dist-various-2/shared.sh /tmp/
+COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/
+RUN /tmp/build-cloudabi-toolchain.sh aarch64-unknown-cloudabi
+RUN /tmp/build-cloudabi-toolchain.sh i686-unknown-cloudabi
+RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi
+COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/
 RUN /tmp/build-fuchsia-toolchain.sh
+COPY dist-various-2/build-solaris-toolchain.sh /tmp/
 RUN /tmp/build-solaris-toolchain.sh x86_64  amd64   solaris-i386
 RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc
 
@@ -44,12 +49,30 @@ ENV \
     CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
     CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++
 
+# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It can
+# automatically pick the right compiler path.
+ENV \
+    AR_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-ar \
+    CC_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-clang \
+    CXX_aarch64_unknown_cloudabi=aarch64-unknown-cloudabi-clang++ \
+    AR_i686_unknown_cloudabi=i686-unknown-cloudabi-ar \
+    CC_i686_unknown_cloudabi=i686-unknown-cloudabi-clang \
+    CXX_i686_unknown_cloudabi=i686-unknown-cloudabi-clang++ \
+    AR_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-ar \
+    CC_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang \
+    CXX_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang++
+
 ENV TARGETS=x86_64-unknown-fuchsia
 ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
 ENV TARGETS=$TARGETS,sparcv9-sun-solaris
 ENV TARGETS=$TARGETS,wasm32-unknown-unknown
 ENV TARGETS=$TARGETS,x86_64-sun-solaris
 ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
+ENV TARGETS=$TARGETS,aarch64-unknown-cloudabi
+# FIXME(EdSchouten): Enable ARMv7 support once libc ≥0.2.37 has been merged.
+# ENV TARGETS=$TARGETS,armv7-unknown-cloudabi-eabihf
+ENV TARGETS=$TARGETS,i686-unknown-cloudabi
+ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
 
 ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
 ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
diff --git a/src/ci/docker/scripts/cloudabi-toolchain.sh b/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh
index 5d6ecb48d3c..d64da436639 100755
--- a/src/ci/docker/scripts/cloudabi-toolchain.sh
+++ b/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh
@@ -31,22 +31,20 @@ apt-get install -y --no-install-recommends \
 
 # Set up a Clang-based cross compiler toolchain.
 # Based on the steps described at https://nuxi.nl/cloudabi/debian/
-IFS=,
-for target in ${TARGETS}; do
-  for tool in ar nm objdump ranlib size; do
-    ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool}
-  done
-  ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc
-  ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++
-  ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld
-  ln -s ../../${target} /usr/lib/llvm-5.0/${target}
-
-  # FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It
-  # can make use of ${target}-cc and ${target}-c++, without incorrectly
-  # assuming it's MSVC.
-  ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang
-  ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang++
+target=$1
+for tool in ar nm objdump ranlib size; do
+  ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool}
 done
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++
+ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld
+ln -s ../../${target} /usr/lib/llvm-5.0/${target}
+
+# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It
+# can make use of ${target}-cc and ${target}-c++, without incorrectly
+# assuming it's MSVC.
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang
+ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang++
 
 # Install the C++ runtime libraries from CloudABI Ports.
 echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \
@@ -54,6 +52,4 @@ echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \
 curl 'https://pgp.mit.edu/pks/lookup?op=get&search=0x0DA51B8531344B15' | \
     apt-key add -
 apt-get update
-for target in ${TARGETS}; do
-  apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime
-done
+apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime