Use downloaded snapshots instead of in-tree rust. Also a working linux travis conf

This commit is contained in:
Manish Goregaokar 2014-06-12 00:51:40 +05:30
parent 58b776e0b5
commit 746ae7625b
4 changed files with 51 additions and 1 deletions

21
configure vendored
View file

@ -401,6 +401,26 @@ probe CFG_CLANG clang++
CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET}/"
make_dir "${CFG_BUILD_DIR}"
SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | rev | cut -d/ -f1 | rev)
if [ $CFG_OSTYPE = "linux-androideabi" ]
then
CFG_TREE_RUST=1 # We don't yet have Android snapshots
fi
if [ -z "$CFG_TREE_RUST" ]
then
if ! [ -f ${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}/bin/rustc -a -f ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp -a -z "$(diff ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)" ]
then
rm -rf ${CFG_BUILD_DIR}/rust_snapshot
make_dir ${CFG_BUILD_DIR}/rust_snapshot
make_dir ${CFG_BUILD_DIR}/src/compiler/rust
SNAPSHOT_URL="http://servo-rust.s3.amazonaws.com/$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)-${DEFAULT_TARGET}.tar.gz"
step_msg "Fetching snapshot from ${SNAPSHOT_URL}"
curl -o ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz ${SNAPSHOT_URL}
tar -zxf ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz -C ${CFG_BUILD_DIR}/rust_snapshot/
cp -f ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp
fi
CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}
fi
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
then
@ -560,6 +580,7 @@ putvar CFG_RUST_HOME
putvar CFG_PATH
putvar CFG_LOCAL_RUSTC
putvar CFG_LOCAL_RUST_ROOT
putvar CFG_TREE_RUST
putvar CFG_ENABLE_DEBUG
putvar CFG_ENABLE_DEBUG_SKIA