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.
This commit is contained in:
parent
5801f95cbc
commit
ae4288f9ff
@ -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}
|
@ -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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user