Skip to content

Commit 175fd8e

Browse files
committed
Update snapshot scripts to understand new dir layout
1 parent 2c1b269 commit 175fd8e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/etc/get-snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def unpack_snapshot(snap):
99
print("opening snapshot " + dl_path)
1010
tar = tarfile.open(dl_path)
1111
kernel = get_kernel()
12-
for name in snapshot_files[kernel]:
12+
for name in old_snapshot_files[kernel]:
1313
p = "rust-stage0/" + name
1414
fp = os.path.join("stage0", name)
1515
print("extracting " + fp)

src/etc/snapshot.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ def scrub(b):
1616
download_unpack_base = os.path.join(download_dir_base, "unpack")
1717

1818
snapshot_files = {
19+
"linux": ["rustc", "glue.o", "lib/libstd.so" ],
20+
"macos": ["rustc", "glue.o", "lib/libstd.dylib" ],
21+
"winnt": ["rustc.exe", "glue.o", "lib/std.dll" ]
22+
}
23+
24+
# This is a transitional list of files so that the unpacker knows to
25+
# use the old directory layout and the snapshotter knows to use the
26+
# new directory layout
27+
old_snapshot_files = {
1928
"linux": ["rustc", "glue.o", "libstd.so" ],
2029
"macos": ["rustc", "glue.o", "libstd.dylib" ],
2130
"winnt": ["rustc.exe", "glue.o", "std.dll" ]

0 commit comments

Comments
 (0)