Skip to content

Commit 1fddded

Browse files
committed
Add snap-stageN targets.
1 parent b64098e commit 1fddded

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

mk/snap.mk

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11

2-
snap:
3-
$(CFG_SRC_DIR)src/etc/make-snapshot.py
2+
snap-stage1: stage1/rustc stage1/glue.o stage1/$(CFG_STDLIB)
3+
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage1
4+
5+
snap-stage2: stage2/rustc stage2/glue.o stage2/$(CFG_STDLIB)
6+
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage2
7+
8+
snap-stage3: stage3/rustc stage3/glue.o stage3/$(CFG_STDLIB)
9+
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage3
10+

src/etc/make-snapshot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22

3-
import snapshot
4-
print(snapshot.make_snapshot())
3+
import snapshot, sys
4+
print(snapshot.make_snapshot(sys.argv[1]))

src/etc/snapshot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def hash_file(x):
102102
return scrub(h.hexdigest())
103103

104104

105-
def make_snapshot():
105+
def make_snapshot(stage):
106106
kernel = get_kernel()
107107
platform = get_platform()
108108
rev = local_rev_short_sha()
@@ -112,7 +112,7 @@ def make_snapshot():
112112

113113
tar = tarfile.open(file0, "w:bz2")
114114
for name in snapshot_files[kernel]:
115-
tar.add(os.path.join("stage2", name),
115+
tar.add(os.path.join(stage, name),
116116
"rust-stage0/" + name)
117117
tar.close()
118118

0 commit comments

Comments
 (0)