mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
Auto merge of #42218 - venkatagiri:update_cross, r=alexchrichton
use shared scripts for init and sccache in cross image cc #42201 cc @malbarbo
This commit is contained in:
commit
920c4799be
@ -21,14 +21,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
libssl-dev \
|
libssl-dev \
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
# dumb-init
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-unknown-linux-musl && \
|
COPY scripts/dumb-init.sh /scripts/
|
||||||
chmod +x /usr/local/bin/sccache
|
RUN sh /scripts/dumb-init.sh
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
|
||||||
dpkg -i dumb-init_*.deb && \
|
|
||||||
rm dumb-init_*.deb
|
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
@ -38,23 +33,11 @@ RUN ./build-rumprun.sh
|
|||||||
COPY cross/build-arm-musl.sh /tmp/
|
COPY cross/build-arm-musl.sh /tmp/
|
||||||
RUN ./build-arm-musl.sh
|
RUN ./build-arm-musl.sh
|
||||||
|
|
||||||
# originally from
|
COPY cross/install-mips-musl.sh /tmp/
|
||||||
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
|
RUN ./install-mips-musl.sh
|
||||||
RUN mkdir /usr/local/mips-linux-musl
|
|
||||||
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2 | \
|
|
||||||
tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
|
|
||||||
RUN for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do \
|
|
||||||
ln -s $file /usr/local/bin/`basename $file`; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Note that this originally came from:
|
COPY cross/install-mipsel-musl.sh /tmp/
|
||||||
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
|
RUN ./install-mipsel-musl.sh
|
||||||
RUN mkdir /usr/local/mipsel-linux-musl
|
|
||||||
RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
|
|
||||||
tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
|
|
||||||
RUN for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do \
|
|
||||||
ln -s $file /usr/local/bin/`basename $file`; \
|
|
||||||
done
|
|
||||||
|
|
||||||
ENV TARGETS=asmjs-unknown-emscripten
|
ENV TARGETS=asmjs-unknown-emscripten
|
||||||
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
|
ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
|
||||||
@ -80,3 +63,10 @@ ENV RUST_CONFIGURE_ARGS \
|
|||||||
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
|
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
|
||||||
--musl-root-armv7=/usr/local/armv7-linux-musleabihf
|
--musl-root-armv7=/usr/local/armv7-linux-musleabihf
|
||||||
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
||||||
|
|
||||||
|
# sccache
|
||||||
|
COPY scripts/sccache.sh /scripts/
|
||||||
|
RUN sh /scripts/sccache.sh
|
||||||
|
|
||||||
|
# init
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
24
src/ci/docker/cross/install-mips-musl.sh
Executable file
24
src/ci/docker/cross/install-mips-musl.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir /usr/local/mips-linux-musl
|
||||||
|
|
||||||
|
# originally from
|
||||||
|
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/
|
||||||
|
# OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
|
||||||
|
URL="https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror"
|
||||||
|
FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2"
|
||||||
|
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
|
||||||
|
|
||||||
|
for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do
|
||||||
|
ln -s $file /usr/local/bin/`basename $file`
|
||||||
|
done
|
24
src/ci/docker/cross/install-mipsel-musl.sh
Executable file
24
src/ci/docker/cross/install-mipsel-musl.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir /usr/local/mipsel-linux-musl
|
||||||
|
|
||||||
|
# Note that this originally came from:
|
||||||
|
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/
|
||||||
|
# OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
|
||||||
|
URL="https://s3.amazonaws.com/rust-lang-ci/libc"
|
||||||
|
FILE="OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2"
|
||||||
|
curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
|
||||||
|
|
||||||
|
for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do
|
||||||
|
ln -s $file /usr/local/bin/`basename $file`
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user