| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 1 | # 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 | |
| 11 | set -ex |
| 12 | |
| 13 | ROOT=$1 |
| 14 | cp -r $ROOT/libc /tmp/libc |
| 15 | cd /tmp/libc |
| 16 | |
| 17 | TARGET=$(cat $ROOT/TARGET) |
| Alex Crichton | 3eb4a48 | 2016-06-10 05:03:23 -0700 | [diff] [blame] | 18 | export CARGO_TARGET_DIR=/tmp |
| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 19 | |
| 20 | case $TARGET in |
| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 21 | *-openbsd) |
| Sébastien Marie | a40adc6 | 2016-09-07 19:30:57 +0200 | [diff] [blame^] | 22 | pkg_add cargo gcc%4.9 rust |
| Alex Crichton | d820c4a | 2016-01-18 11:16:38 -0800 | [diff] [blame] | 23 | export CC=egcc |
| 24 | ;; |
| 25 | |
| 26 | *) |
| 27 | echo "Unknown target: $TARGET" |
| 28 | exit 1 |
| 29 | ;; |
| 30 | esac |
| 31 | |
| 32 | exec sh ci/run.sh $TARGET |