Add support for 'T' transition snapshots, which are identical to S snapshots except they tell the makefile to stop at stage1.

This commit is contained in:
Graydon Hoare 2011-05-13 17:00:43 -07:00
parent fac1342513
commit ae784df3ce
4 changed files with 29 additions and 8 deletions

View file

@ -165,6 +165,25 @@ LLVM_AS := $(CFG_LLVM_BINDIR)/llvm-as
# Single-target rules
######################################################################
ifneq ($(CFG_IN_TRANSITION),)
CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***)
CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
all: rt/$(CFG_RUNTIME) \
rustllvm/$(CFG_RUSTLLVM) \
stage0/$(CFG_STDLIB) \
stage0/intrinsics.bc \
stage0/rustc$(X) \
$(GENERATED) \
$(DOCS) \
stage1/$(CFG_STDLIB) \
stage1/intrinsics.bc \
stage1/glue.o \
stage1/rustc$(X) \
else
all: rt/$(CFG_RUNTIME) \
rustllvm/$(CFG_RUSTLLVM) \
stage0/$(CFG_STDLIB) \
@ -185,12 +204,14 @@ all: rt/$(CFG_RUNTIME) \
stage3/intrinsics.bc \
stage3/rustc$(X)
endif
######################################################################
# Re-configuration
######################################################################
config.mk: $(S)configure $(S)Makefile.in
config.mk: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
@$(call E, cfg: reconfiguring)
$(S)configure $(CFG_CONFIGURE_ARGS)

6
configure vendored
View file

@ -217,6 +217,12 @@ then
err "either clang or gcc is required"
fi
if head -n 1 ${CFG_SRC_DIR}src/snapshots.txt | grep -q '^T'
then
CFG_IN_TRANSITION=1
putvar CFG_IN_TRANSITION
fi
# Valgrind is only reliable on Linux. On Windows it doesn't work at all, and
# on the Mac the dynamic linker causes Valgrind to emit a huge stream of
# errors.

View file

@ -41,9 +41,6 @@ def determine_curr_snapshot_for_platform():
parsed = parse_line(i, line)
if (not parsed): continue
if parsed["type"] == "transition":
raise Exception("working on a transition, not updating stage0")
if found_snap and parsed["type"] == "file":
if parsed["platform"] == platform:
hsh = parsed["hash"]

View file

@ -35,10 +35,7 @@ def parse_line(n, line):
match = re.match(r"([ST]) (\d{4}-\d{2}-\d{2}) ([a-fA-F\d]+)\s*$", line);
if (not match):
raise Exception("%s:%d:E syntax error" % (snapshotfile, n))
ttype = "snapshot"
if (match.group(1) == "T"):
ttype = "transition"
return {"type": ttype,
return {"type": "snapshot",
"date": match.group(2),
"rev": match.group(3)}