mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
This commit is contained in:
parent
a3127593c2
commit
90adcc6265
2 changed files with 16 additions and 8 deletions
20
configure
vendored
20
configure
vendored
|
@ -402,6 +402,7 @@ probe CFG_CLANG clang++
|
||||||
CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET}/"
|
CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET}/"
|
||||||
make_dir "${CFG_BUILD_DIR}"
|
make_dir "${CFG_BUILD_DIR}"
|
||||||
SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | rev | cut -d/ -f1 | rev)
|
SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | rev | cut -d/ -f1 | rev)
|
||||||
|
SNAPSHOT_HASH=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | cut -d/ -f1)
|
||||||
if [ $CFG_OSTYPE = "linux-androideabi" ]
|
if [ $CFG_OSTYPE = "linux-androideabi" ]
|
||||||
then
|
then
|
||||||
CFG_TREE_RUST=1 # We don't yet have Android snapshots
|
CFG_TREE_RUST=1 # We don't yet have Android snapshots
|
||||||
|
@ -410,14 +411,17 @@ if [ -z "$CFG_TREE_RUST" ]
|
||||||
then
|
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)" ]
|
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
|
then
|
||||||
rm -rf ${CFG_BUILD_DIR}/rust_snapshot
|
make_dir ${CFG_BUILD_DIR}/rust_snapshot
|
||||||
make_dir ${CFG_BUILD_DIR}/rust_snapshot
|
make_dir ${CFG_BUILD_DIR}/src/compiler/rust
|
||||||
make_dir ${CFG_BUILD_DIR}/src/compiler/rust
|
if [ ! -f ${CFG_BUILD_DIR}/rust_snapshot/snapshot-${SNAPSHOT_HASH}.tgz ]
|
||||||
SNAPSHOT_URL="https://servo-rust.s3.amazonaws.com/$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)-${DEFAULT_TARGET}.tar.gz"
|
then
|
||||||
step_msg "Fetching snapshot from ${SNAPSHOT_URL}"
|
SNAPSHOT_URL="https://servo-rust.s3.amazonaws.com/$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)-${DEFAULT_TARGET}.tar.gz"
|
||||||
curl -o ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz ${SNAPSHOT_URL}
|
step_msg "Fetching snapshot from ${SNAPSHOT_URL}"
|
||||||
tar -zxf ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz -C ${CFG_BUILD_DIR}/rust_snapshot/
|
curl -o ${CFG_BUILD_DIR}/rust_snapshot/snapshot-${SNAPSHOT_HASH}.tgz ${SNAPSHOT_URL}
|
||||||
cp -f ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp
|
fi
|
||||||
|
rm -rf ${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}
|
||||||
|
tar -zxf ${CFG_BUILD_DIR}/rust_snapshot/snapshot-${SNAPSHOT_HASH}.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
|
fi
|
||||||
CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}
|
CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -61,3 +61,7 @@ clean-servo: clean-gfx clean-util clean-embedding clean-net clean-script clean-m
|
||||||
@$(call E, "cleaning servo")
|
@$(call E, "cleaning servo")
|
||||||
$(Q)rm -f servo servo-test $(foreach lib_crate,$(SERVO_LIB_CRATES),servo-test-$(lib_crate)) libservo*.so libservo*.a
|
$(Q)rm -f servo servo-test $(foreach lib_crate,$(SERVO_LIB_CRATES),servo-test-$(lib_crate)) libservo*.so libservo*.a
|
||||||
$(Q)cd $(BINDINGS_SRC) && rm -f *.pkl *.rs
|
$(Q)cd $(BINDINGS_SRC) && rm -f *.pkl *.rs
|
||||||
|
|
||||||
|
clean-rust-snapshot-archives:
|
||||||
|
@$(call E, "cleaning rust snapshot archives")
|
||||||
|
$(Q)cd $(B)/rust_snapshot/ && rm -rf *.tgz
|
Loading…
Add table
Add a link
Reference in a new issue