mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Remove the Rust submodule.
This commit is contained in:
parent
dab0374d3e
commit
34bff1110c
8 changed files with 16 additions and 109 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
44
Makefile.in
44
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 $@
|
||||
|
|
54
configure
vendored
54
configure
vendored
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 5e4a171bd551433e8d58114744c4efbc4bc90ae4
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue