blob: b2f457df916f85688dce328af91b06543fad6ff6 [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)
Sébastien Mariea40adc62016-09-07 19:30:57 +020022 pkg_add cargo gcc%4.9 rust
Alex Crichtond820c4a2016-01-18 11:16:38 -080023 export CC=egcc
24 ;;
25
26 *)
27 echo "Unknown target: $TARGET"
28 exit 1
29 ;;
30esac
31
32exec sh ci/run.sh $TARGET