]> git.lizzy.rs Git - rust.git/commitdiff
More test fixes from rollup
authorAlex Crichton <alex@alexcrichton.com>
Fri, 20 Jan 2017 01:18:12 +0000 (17:18 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 20 Jan 2017 21:49:16 +0000 (13:49 -0800)
13 files changed:
.travis.yml
appveyor.yml
src/bootstrap/compile.rs
src/ci/docker/cross/build-arm-musl.sh
src/ci/docker/cross/build-rumprun.sh
src/ci/docker/dist-arm-linux/Dockerfile
src/ci/docker/dist-arm-linux/build-toolchains.sh [new file with mode: 0755]
src/ci/docker/dist-armv7-aarch64-linux/Dockerfile
src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh [new file with mode: 0755]
src/ci/docker/emscripten/build-emscripten.sh
src/ci/docker/linux-tested-targets/Dockerfile
src/librustc_trans/back/write.rs
src/test/run-pass/sse2.rs

index 19d5b2d7e058ee0e570b0e77f6af0543f3bf3356..0546f6827a6f59fa98c9209416400f0ba5affc9a 100644 (file)
@@ -9,6 +9,7 @@ git:
   submodules: false
 
 matrix:
+  fast_finish: true
   include:
     # Linux builders, all docker images
     - env: IMAGE=android DEPLOY=1
@@ -23,6 +24,7 @@ matrix:
     - 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
index 56ab8d98abd72298df9d04078e2913a63fed5e31..b0eb26474548ec51af6e911132a3899882ae97b7 100644 (file)
@@ -73,6 +73,9 @@ environment:
     MINGW_DIR: mingw64
     DEPLOY: 1
 
+matrix:
+  fast_finish: true
+
 clone_depth: 1
 build: false
 
index 0eeb799672cf200a5406aae656cad80ec16a71fa..079f93e7331f1db0763acc442ce417d86b440a10 100644 (file)
@@ -213,7 +213,11 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
     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"));
     }
index 989862b1b73b94c2c38cf06a510948d73909992e..938e69834e434f95641db3aaa588186d579578f4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/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.
@@ -13,16 +13,33 @@ set -ex
 
 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
 
@@ -30,11 +47,11 @@ tar xf musl-$MUSL.tar.gz
 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
 
@@ -42,11 +59,11 @@ tar xf musl-$MUSL.tar.gz
 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*
 
@@ -54,7 +71,6 @@ ln -nsf ../arm-linux-musleabi/bin/musl-gcc /usr/local/bin/arm-linux-musleabi-gcc
 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 -
 
index d0ef0e55db158ed6cfe4596fd29df0c32e5c0580..59b1c9b641535f3b1106331bed41352bb93ca7df 100755 (executable)
@@ -28,7 +28,6 @@ exit 1
   set -x
 }
 
-
 git clone https://github.com/rumpkernel/rumprun
 cd rumprun
 git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b
index 956969684b4067f849f1a635ce13f289fe99ed71..03ca4c28078b61fa0697940ff4024a2781d9d109 100644 (file)
@@ -58,22 +58,8 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
 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
 
diff --git a/src/ci/docker/dist-arm-linux/build-toolchains.sh b/src/ci/docker/dist-arm-linux/build-toolchains.sh
new file mode 100755 (executable)
index 0000000..ed1406b
--- /dev/null
@@ -0,0 +1,45 @@
+#!/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
index 2070ed47eb7f6c942cc50fd9f43bb038def486ac..93d9e004c8c2d4edb3d726ef51b76361a891a867 100644 (file)
@@ -59,21 +59,8 @@ USER rustbuild
 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
 
diff --git a/src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh b/src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh
new file mode 100755 (executable)
index 0000000..ebd5ef4
--- /dev/null
@@ -0,0 +1,45 @@
+#!/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
index 2ce7a58ae66560f74310620263dc5571fbc096cb..88bf583007ce53f296b5a2405dac1174025d94a9 100755 (executable)
 
 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
index 2a43201ed0aeb859e98a5e1c9b6da89e2e5263a8..7f95e17c7097acc4ebc93ab1b87a6eda7e2af291 100644 (file)
@@ -32,10 +32,10 @@ ENV RUST_CONFIGURE_ARGS \
       --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 \
index 9e5391ebd8243fd56ff6455b962c5f306a9690d0..b3a2d66a07c112ef779128a1c5321e691a50e236 100644 (file)
@@ -668,7 +668,8 @@ pub fn run_passes(sess: &Session,
     // 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);
 
index 7e42698d496768d3a100409dc165aba8b5f0268d..8d88c17af79b3f1c7abc5040b326ec35b4488d33 100644 (file)
 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"),