diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2014-08-21 15:17:52 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2014-08-21 15:48:26 +0100 |
commit | 34bff1110cffcbbf62cc4b404b06f7692fc5be1a (patch) | |
tree | 2fea29d42ec1fe43dd3f56efe2fb1f1ad41f2abc | |
parent | dab0374d3e91adaca5f4acf3818ecfc3786901b3 (diff) | |
download | servo-34bff1110cffcbbf62cc4b404b06f7692fc5be1a.tar.gz servo-34bff1110cffcbbf62cc4b404b06f7692fc5be1a.zip |
Remove the Rust submodule.
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Makefile.backup | 18 | ||||
-rw-r--r-- | Makefile.in | 44 | ||||
-rwxr-xr-x | configure | 54 | ||||
m--------- | src/compiler/rust | 0 | ||||
-rw-r--r-- | src/compiler/rust-auto-clean-trigger | 4 | ||||
-rw-r--r-- | src/etc/tidy.py | 1 | ||||
-rw-r--r-- | src/rust-snapshot-hash (renamed from src/compiler/rust-snapshot-hash) | 0 |
8 files changed, 16 insertions, 108 deletions
diff --git a/.gitmodules b/.gitmodules index f07d1109975..9e263462b86 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,9 +68,6 @@ [submodule "src/support/skia/skia"] path = src/support/skia/skia url = https://github.com/servo/skia.git -[submodule "src/compiler/rust"] - path = src/compiler/rust - url = https://github.com/servo/rust.git [submodule "src/support/alert/rust-alert"] path = src/support/alert/rust-alert url = https://github.com/servo/rust-alert.git diff --git a/Makefile.backup b/Makefile.backup deleted file mode 100644 index 81ae62f2519..00000000000 --- a/Makefile.backup +++ /dev/null @@ -1,18 +0,0 @@ -# Build commands for backing up and restoring the Rust build. -# Because Rust takes a very long time to build and changes infrequently, -# the bots want to reuse it between builds. They can do so by running -# `make backup-rust` and `make restore-rust`. -# -# backup-rust is run before the build directory is cleaned. if it fails, that's ok. -# -# restore-rust is run after configure and before invoking make. if it fails, we must abort. - --include .config.mk.last - -.PHONY: backup-rust -backup-rust: - @if [ -d $(CFG_BUILD_DIR)src/compiler/rust/ ]; then echo "Backing up Rust"; mv $(CFG_BUILD_DIR)src/compiler/rust ../$(CFG_TARGET); else echo "Skipping Rust backup"; fi - -.PHONY: restore-rust -restore-rust: - @if [ ! -z "$(CFG_BUILD_DIR)" -a -d ../$(CFG_TARGET) ]; then echo "Restoring Rust from backup"; rm -rf $(CFG_BUILD_DIR)src/compiler/rust; mv ../$(CFG_TARGET) $(CFG_BUILD_DIR)src/compiler/rust; else echo "Skipping Rust restore"; fi diff --git a/Makefile.in b/Makefile.in index b2bbf0f958d..ce3e45a573c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,10 +95,8 @@ $(CFG_BUILD_HOME)config.stamp : $(S)configure $(S)Makefile.in @$(call E, cfg: reconfiguring) $(Q)$(S)configure $(CFG_CONFIGURE_ARGS) -# Fetch or build the compiler -ifeq ($(CFG_SNAPSHOT_RUSTC),1) -SNAPSHOT_HASH_FILE=$(S)/src/compiler/rust-snapshot-hash +SNAPSHOT_HASH_FILE=$(S)/src/rust-snapshot-hash SNAPSHOT_VERSION=$(shell cat $(SNAPSHOT_HASH_FILE) | rev | cut -d/ -f1 | rev) SNAPSHOT_HASH=$(shell cat $(SNAPSHOT_HASH_FILE) | cut -d/ -f1) SNAPSHOT_URL="https://servo-rust.s3.amazonaws.com/$(shell cat $(SNAPSHOT_HASH_FILE))-$(DEFAULT_TARGET).tar.gz" @@ -112,10 +110,17 @@ $(SNAPSHOT_TARBALL): $(Q)curl -o $@.tmp $(SNAPSHOT_URL) $(Q)mv $@.tmp $@ +clean-rust: + $(Q)rm -rf $(B)/rust_snapshot/$(SNAPSHOT_VERSION)-$(DEFAULT_TARGET) + + +ifeq ($(CFG_SNAPSHOT_RUSTC),1) + ifeq (identical,$(and $(wildcard $(CFG_RUSTC)), $(wildcard $(SNAPSHOT_HASH_STAMP)), \ $(if $(shell diff $(SNAPSHOT_HASH_FILE) $(SNAPSHOT_HASH_STAMP)),,identical))) $(CFG_RUSTC): + @echo Rust snapshot $(SNAPSHOT_HASH) already up to date. else @@ -125,33 +130,11 @@ $(CFG_RUSTC): $(SNAPSHOT_TARBALL) clean-rust endif -clean-rust: - $(Q)rm -rf $(B)/rust_snapshot/$(SNAPSHOT_VERSION)-$(DEFAULT_TARGET) - else # not a snapshot -ifeq ($(CFG_LOCAL_RUSTC),1) - $(CFG_RUSTC): -clean-rust: - -else # in-tree rust - -$(CFG_RUSTC): $(B)src/compiler/rust/rust-auto-clean-stamp - @$(call E, building rustc) - $(Q)CFG_RUSTC_FLAGS= CFG_ENABLE_DEBUG= RUSTFLAGS="$(CFG_RUSTC_SELF_FLAGS)" $(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" - -clean-rust: - @$(call E, cleaning rustc) - $(Q)CFG_RUSTC_FLAGS= CFG_ENABLE_DEBUG= RUSTFLAGS="$(CFG_RUSTC_SELF_FLAGS)" $(MAKE) -C "$(CFG_BUILD_DIR)src/compiler/rust" clean - endif -endif - -$(B)src/compiler/rust/rust-auto-clean-stamp: $(S)src/compiler/rust-auto-clean-trigger - $(Q)$(MAKE) clean-rust - touch $@ rust: $(CFG_RUSTC) @@ -489,7 +472,7 @@ package: servo else ifeq ($(CFG_OSTYPE),linux-androideabi) package: servo mkdir -p sofile - find . ! \( \( -type d -path './sofile' -o -path './$(CFG_TARGET)/src/compiler/rust' -o -path '*/host' \) -prune \) -name '*.so' -type f | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ + find . ! \( \( -type d -path './sofile' -o -path '*/host' \) -prune \) -name '*.so' -type f | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ find $(CFG_RUST_HOME)/lib/rustlib/$(CFG_TARGET)/lib/ -name '*.so' -type f -size +1c | xargs -I {} cp -f {} $(CFG_BUILD_HOME)sofile/ cd $(S)src/platform/android/servo-android-glue && make with-libs cd $(CFG_BUILD_HOME) @@ -505,12 +488,3 @@ endif bindings: $(AUTOGEN_SRC_script) include $(S)mk/doc.mk - -# Backup targets. These axist until build slaves are using Makefile.backup directly. - -.PHONY: backup-rust restore-rust -backup-rust: - $(MAKE) -f $(S)Makefile.backup $@ - -restore-rust: - $(MAKE) -f $(S)Makefile.backup $@ diff --git a/configure b/configure index a5ed768a24a..90d5ecc97a6 100755 --- a/configure +++ b/configure @@ -339,7 +339,7 @@ CFG_PATH=$PATH if [ -n "$CFG_DISABLE_MANAGE_SUBMODULES" ] then - if git status $CFG_SRC_DIR/src/compiler $CFG_SRC_DIR/src/support $CFG_SRC_DIR/src/platform \ + if git status $CFG_SRC_DIR/src/support $CFG_SRC_DIR/src/platform \ | grep -q 'modified:.*modified content'; then err "Some submodule has a dirty working tree. See 'git status'." fi @@ -369,7 +369,6 @@ opt manage-submodules 1 "let the build manage the git submodules" opt fast-make 0 "use .gitmodules as timestamp for submodule deps" opt debug 0 "build with debugging code and symbols" opt debug-skia 0 "build Skia and Azure for debugging (significant performance hit)" -opt tree-rust 0 "build in-tree rust compiler" valopt local-rust-root "" "set prefix for local rust binary" valopt target "${DEFAULT_TARGET}" "target to be compiled" valopt android-cross-path "/opt/ndk_standalone" "Android NDK cross compiler path" @@ -384,11 +383,6 @@ then exit 0 fi -if [ ! -z "$CFG_ENABLE_TREE_RUST" -a ! -z "$CFG_LOCAL_RUST_ROOT" ] -then - err "Specify at most one of --enable-tree-rust and --local-rust-root." -fi - # Split target triple split_triple "${CFG_TARGET}" TARGET_CPUTYPE TARGET_VENDOR TARGET_OSTYPE @@ -459,19 +453,12 @@ then err "No rustc found at ${CFG_LOCAL_RUST_ROOT}/bin/rustc" fi else - if [ -z "$CFG_ENABLE_TREE_RUST" ] - then - step_msg "Using binary Rust snapshot" - make_dir ${CFG_BUILD_DIR}/rust_snapshot - CFG_SNAPSHOT_RUSTC=1 - SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | rev | cut -d/ -f1 | rev) - CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET} - CFG_RUST_HOME=${CFG_LOCAL_RUST_ROOT} - else - step_msg "using in-tree rust compiler" - # The Rust compiler we're going to build - CFG_RUST_HOME="${CFG_BUILD_DIR}src/compiler/rust/${DEFAULT_TARGET}/stage2" - fi + step_msg "Using binary Rust snapshot" + make_dir ${CFG_BUILD_DIR}/rust_snapshot + CFG_SNAPSHOT_RUSTC=1 + SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/rust-snapshot-hash | rev | cut -d/ -f1 | rev) + CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET} + CFG_RUST_HOME=${CFG_LOCAL_RUST_ROOT} fi CFG_RUSTC=${CFG_RUST_HOME}/bin/rustc @@ -620,7 +607,6 @@ putvar CFG_PATH putvar CFG_SNAPSHOT_RUSTC putvar CFG_LOCAL_RUSTC putvar CFG_LOCAL_RUST_ROOT -putvar CFG_ENABLE_TREE_RUST putvar CFG_ENABLE_DEBUG putvar CFG_ENABLE_DEBUG_SKIA @@ -656,37 +642,11 @@ make_dir ${CFG_BUILD_DIR}src/components/script_traits make_dir ${CFG_BUILD_DIR}src/components/style make_dir ${CFG_BUILD_DIR}src/components/main make_dir src/test/html/ref -make_dir src/compiler/rust # TODO: don't run configure on submodules unless necessary. For an example, # see how Rust's configure script optionally reconfigures the LLVM module. step_msg "running submodule configure scripts" -# Only reconfigure Rust when it changes -do_reconfigure=1 -index1="${CFG_SRC_DIR}.git/modules/src/compiler/rust/index" -index2="${CFG_SRC_DIR}src/compiler/rust/.git/index" -for index in ${index1} ${index2} -do - config_stamp="${CFG_BUILD_DIR}src/compiler/rust/config.stamp" - if test -e ${index} -a -e ${config_stamp} -a ${config_stamp} -nt ${index} - then - msg "not reconfiguring Rust, config.stamp is fresh" - do_reconfigure=0 - fi -done - -if [ -z "$CFG_LOCAL_RUST_ROOT" -a ${do_reconfigure} -ne 0 ] -then - cd ${CFG_BUILD_DIR}src/compiler/rust - RUST_CONFIGURE_ARGS="--target=${CFG_TARGET} --enable-debug" - if [ $CFG_OSTYPE = "linux-androideabi" ]; then - RUST_CONFIGURE_ARGS="${RUST_CONFIGURE_ARGS} --android-cross-path=${CFG_ANDROID_CROSS_PATH}" - fi - ${CFG_SRC_DIR}src/compiler/rust/configure ${RUST_CONFIGURE_ARGS} - cd ${CFG_BUILD_DIR} -fi - # fontconfig expects to use an installed freetype, but we want to use our version on Android if [ $CFG_OSTYPE = "linux-androideabi" ] then diff --git a/src/compiler/rust b/src/compiler/rust deleted file mode 160000 -Subproject 5e4a171bd551433e8d58114744c4efbc4bc90ae diff --git a/src/compiler/rust-auto-clean-trigger b/src/compiler/rust-auto-clean-trigger deleted file mode 100644 index 010883421ab..00000000000 --- a/src/compiler/rust-auto-clean-trigger +++ /dev/null @@ -1,4 +0,0 @@ -# If this file is modified, then rust will be forcibly cleaned and then rebuilt. -# The actual contents of this file do not matter, but to trigger a change on the -# build bots then the contents should be changed so git updates the mtime. -2014-07-16 diff --git a/src/etc/tidy.py b/src/etc/tidy.py index d529bfd5f8b..f5175013f55 100644 --- a/src/etc/tidy.py +++ b/src/etc/tidy.py @@ -48,7 +48,6 @@ exceptions = [ # Upstream "src/support", "src/platform", - "src/compiler", "src/test/wpt/web-platform-tests", # Generated and upstream code combined with our own. Could use cleanup diff --git a/src/compiler/rust-snapshot-hash b/src/rust-snapshot-hash index 7497980738a..7497980738a 100644 --- a/src/compiler/rust-snapshot-hash +++ b/src/rust-snapshot-hash |