blob: 70f312e3bd5f1c478a0410d6ca3da652bc864bb1 [file] [log] [blame]
Alex Crichtond820c4a2016-01-18 11:16:38 -08001# Initial script which is run inside of all qemu images. The first argument to
2# this script (as arranged by the qemu image itself) is the path to where the
3# libc crate is mounted.
4#
5# For qemu images we currently need to install Rust manually as this wasn't done
6# by the initial run-travis.sh script
7#
8# FIXME: feels like run-travis.sh should be responsible for downloading the
9# compiler.
10
11set -ex
12
13ROOT=$1
14cp -r $ROOT/libc /tmp/libc
15cd /tmp/libc
16
17TARGET=$(cat $ROOT/TARGET)
Alex Crichton3eb4a482016-06-10 05:03:23 -070018export CARGO_TARGET_DIR=/tmp
Alex Crichtond820c4a2016-01-18 11:16:38 -080019
20case $TARGET in
Alex Crichtond820c4a2016-01-18 11:16:38 -080021 *-openbsd)
22 pkg_add rust curl gcc-4.8.4p4
23 curl https://static.rust-lang.org/cargo-dist/2015-04-02/cargo-nightly-x86_64-unknown-openbsd.tar.gz | \
24 tar xzf - -C /tmp
25 export PATH=$PATH:/tmp/cargo-nightly-x86_64-unknown-openbsd/cargo/bin
26 export CC=egcc
27 ;;
28
29 *)
30 echo "Unknown target: $TARGET"
31 exit 1
32 ;;
33esac
34
35exec sh ci/run.sh $TARGET