More test fixes from rollup
This commit is contained in:
parent
5e8d7a4b7c
commit
72c3148bb3
@ -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
|
||||
|
@ -73,6 +73,9 @@ environment:
|
||||
MINGW_DIR: mingw64
|
||||
DEPLOY: 1
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
clone_depth: 1
|
||||
build: false
|
||||
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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 -
|
||||
|
||||
|
@ -28,7 +28,6 @@ exit 1
|
||||
set -x
|
||||
}
|
||||
|
||||
|
||||
git clone https://github.com/rumpkernel/rumprun
|
||||
cd rumprun
|
||||
git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b
|
||||
|
@ -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
|
||||
|
||||
|
45
src/ci/docker/dist-arm-linux/build-toolchains.sh
Executable file
45
src/ci/docker/dist-arm-linux/build-toolchains.sh
Executable file
@ -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
|
@ -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
|
||||
|
||||
|
45
src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh
Executable file
45
src/ci/docker/dist-armv7-aarch64-linux/build-toolchains.sh
Executable file
@ -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
|
@ -11,9 +11,26 @@
|
||||
|
||||
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
|
||||
|
@ -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 \
|
||||
|
@ -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);
|
||||
|
||||
|
@ -13,10 +13,14 @@
|
||||
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"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user