submodules: false
matrix:
+ fast_finish: true
include:
# Linux builders, all docker images
- env: IMAGE=android DEPLOY=1
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
- env: IMAGE=dist-x86-linux DEPLOY=1
+ - env: IMAGE=emscripten
- env: IMAGE=i686-gnu
- env: IMAGE=i686-gnu-nopt
- env: IMAGE=x86_64-gnu
MINGW_DIR: mingw64
DEPLOY: 1
+matrix:
+ fast_finish: true
+
clone_depth: 1
build: false
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
cargo.env("CFG_LLVM_ROOT", s);
}
- if build.config.llvm_static_stdcpp {
+ // Building with a static libstdc++ is only supported on linux right now,
+ // not for MSVC or OSX
+ if build.config.llvm_static_stdcpp &&
+ !target.contains("windows") &&
+ !target.contains("apple") {
cargo.env("LLVM_STATIC_STDCPP",
compiler_file(build.cxx(target), "libstdc++.a"));
}
-#!/bin/sh
+#!/bin/bash
# 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.
MUSL=1.1.16
+hide_output() {
+ set +x
+ on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+ trap "$on_err" ERR
+ bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+ PING_LOOP_PID=$!
+ $@ &> /tmp/build.log
+ trap - ERR
+ kill $PING_LOOP_PID
+ rm /tmp/build.log
+ set -x
+}
+
curl -O https://www.musl-libc.org/releases/musl-$MUSL.tar.gz
tar xf musl-$MUSL.tar.gz
cd musl-$MUSL
CC=arm-linux-gnueabi-gcc \
CFLAGS="-march=armv6 -marm" \
- ./configure \
+ hide_output ./configure \
--prefix=/usr/local/arm-linux-musleabi \
--enable-wrapper=gcc
-make -j$(nproc)
-make install
+hide_output make -j$(nproc)
+hide_output make install
cd ..
rm -rf musl-$MUSL
cd musl-$MUSL
CC=arm-linux-gnueabihf-gcc \
CFLAGS="-march=armv6 -marm" \
- ./configure \
+ hide_output ./configure \
--prefix=/usr/local/arm-linux-musleabihf \
--enable-wrapper=gcc
-make -j$(nproc)
-make install
+hide_output make -j$(nproc)
+hide_output make install
cd ..
rm -rf musl-$MUSL
cd musl-$MUSL
CC=arm-linux-gnueabihf-gcc \
CFLAGS="-march=armv7-a" \
- ./configure \
+ hide_output ./configure \
--prefix=/usr/local/armv7-linux-musleabihf \
--enable-wrapper=gcc
-make -j$(nproc)
-make install
+hide_output make -j$(nproc)
+hide_output make install
cd ..
rm -rf musl-$MUSL*
ln -nsf ../arm-linux-musleabihf/bin/musl-gcc /usr/local/bin/arm-linux-musleabihf-gcc
ln -nsf ../armv7-linux-musleabihf/bin/musl-gcc /usr/local/bin/armv7-linux-musleabihf-gcc
-
curl -L https://github.com/llvm-mirror/llvm/archive/release_39.tar.gz | tar xzf -
curl -L https://github.com/llvm-mirror/libunwind/archive/release_39.tar.gz | tar xzf -
set -x
}
-
git clone https://github.com/rumpkernel/rumprun
cd rumprun
git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b
USER rustbuild
WORKDIR /tmp
-COPY arm-linux-gnueabi.config /tmp/
-RUN mkdir build && \
- cd build && \
- cp ../arm-linux-gnueabi.config .config && \
- ct-ng oldconfig && \
- ct-ng build && \
- cd .. && \
- rm -rf build
-COPY arm-linux-gnueabihf.config /tmp/
-RUN mkdir build && \
- cd build && \
- cp ../arm-linux-gnueabihf.config .config && \
- ct-ng oldconfig && \
- ct-ng build && \
- cd .. && \
- rm -rf build
+COPY arm-linux-gnueabihf.config arm-linux-gnueabi.config build-toolchains.sh /tmp/
+RUN ./build-toolchains.sh
USER root
--- /dev/null
+#!/bin/bash
+# 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
+
+hide_output() {
+ set +x
+ on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+ trap "$on_err" ERR
+ bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+ PING_LOOP_PID=$!
+ $@ &> /tmp/build.log
+ rm /tmp/build.log
+ trap - ERR
+ kill $PING_LOOP_PID
+ set -x
+}
+
+mkdir build
+cd build
+cp ../arm-linux-gnueabi.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build
+
+mkdir build
+cd build
+cp ../arm-linux-gnueabihf.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build
WORKDIR /tmp
COPY armv7-linux-gnueabihf.config /tmp/
-RUN mkdir build && \
- cd build && \
- cp ../armv7-linux-gnueabihf.config .config && \
- ct-ng oldconfig && \
- ct-ng build && \
- cd .. && \
- rm -rf build
-COPY aarch64-linux-gnu.config /tmp/
-RUN mkdir build && \
- cd build && \
- cp ../aarch64-linux-gnu.config .config && \
- ct-ng oldconfig && \
- ct-ng build && \
- cd .. && \
- rm -rf build
+COPY armv7-linux-gnueabihf.config aarch64-linux-gnu.config build-toolchains.sh /tmp/
+RUN ./build-toolchains.sh
USER root
--- /dev/null
+#!/bin/bash
+# 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
+
+hide_output() {
+ set +x
+ on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+ trap "$on_err" ERR
+ bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+ PING_LOOP_PID=$!
+ $@ &> /tmp/build.log
+ rm /tmp/build.log
+ trap - ERR
+ kill $PING_LOOP_PID
+ set -x
+}
+
+mkdir build
+cd build
+cp ../armv7-linux-gnueabihf.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build
+
+mkdir build
+cd build
+cp ../aarch64-linux-gnu.config .config
+ct-ng oldconfig
+hide_output ct-ng build
+cd ..
+rm -rf build
set -ex
+hide_output() {
+ set +x
+ on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+ trap "$on_err" ERR
+ bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+ PING_LOOP_PID=$!
+ $@ &> /tmp/build.log
+ trap - ERR
+ kill $PING_LOOP_PID
+ rm /tmp/build.log
+ set -x
+}
+
curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
tar xzf -
source emsdk_portable/emsdk_env.sh
-emsdk update
-emsdk install --build=Release sdk-tag-1.37.1-32bit
-emsdk activate --build=Release sdk-tag-1.37.1-32bit
+hide_output emsdk update
+hide_output emsdk install --build=Release sdk-tag-1.37.1-32bit
+hide_output emsdk activate --build=Release sdk-tag-1.37.1-32bit
--musl-root-x86_64=/musl-x86_64 \
--musl-root-i686=/musl-i686
+# FIXME should also test i686-unknown-linux-musl
ENV SCRIPT \
python2.7 ../x.py test \
--target x86_64-unknown-linux-musl \
- --target i686-unknown-linux-musl \
--target i586-unknown-linux-gnu \
&& \
python2.7 ../x.py dist \
// Sanity check
assert!(trans.modules.len() == sess.opts.cg.codegen_units ||
sess.opts.debugging_opts.incremental.is_some() ||
- !sess.opts.output_types.should_trans());
+ !sess.opts.output_types.should_trans() ||
+ sess.opts.debugging_opts.no_trans);
let tm = create_target_machine(sess);
use std::env;
fn main() {
- // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
- let real_target = env::var("TARGET").unwrap();
- if real_target.contains("i586") {
- return
+ match env::var("TARGET") {
+ Ok(s) => {
+ // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
+ if s.contains("i586") {
+ return
+ }
+ }
+ Err(_) => return,
}
if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
assert!(cfg!(target_feature = "sse2"),