aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in23
-rwxr-xr-xconfigure6
-rwxr-xr-xsrc/etc/get-snapshot.py3
-rw-r--r--src/etc/snapshot.py5
4 files changed, 29 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index ac4d5069..5e33d8d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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)
diff --git a/configure b/configure
index fa1329b2..e83787b5 100755
--- a/configure
+++ b/configure
@@ -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.
diff --git a/src/etc/get-snapshot.py b/src/etc/get-snapshot.py
index 4fce01e1..806d3751 100755
--- a/src/etc/get-snapshot.py
+++ b/src/etc/get-snapshot.py
@@ -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"]
diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py
index 35bbc3ef..f5ba2bfe 100644
--- a/src/etc/snapshot.py
+++ b/src/etc/snapshot.py
@@ -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)}