about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-14 12:04:11 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-14 12:14:58 -0700
commit1dbf0965a181484477f3daad6da45b8d9d9d0d95 (patch)
tree7daa82747d9fd23637039e3bd511c59604b3f10d
parent0340f32748ad434ae525be5a5d37797be0f67c0f (diff)
downloadrust-1dbf0965a181484477f3daad6da45b8d9d9d0d95.tar.gz
rust-1dbf0965a181484477f3daad6da45b8d9d9d0d95.zip
Add lib/main.o to snapshot
Snapshotting main.o is going to make it easier (I think) to convert main to
use ivecs
-rw-r--r--mk/snap.mk6
-rwxr-xr-xsrc/etc/get-snapshot.py2
-rw-r--r--src/etc/snapshot.py11
3 files changed, 14 insertions, 5 deletions
diff --git a/mk/snap.mk b/mk/snap.mk
index dc9064417d4..819c3e6ba89 100644
--- a/mk/snap.mk
+++ b/mk/snap.mk
@@ -1,15 +1,15 @@
 
 snap-stage1: stage1/rustc$(X) stage1/lib/glue.o stage1/lib/$(CFG_RUNTIME) \
-	stage1/$(CFG_RUSTLLVM)
+	stage1/$(CFG_RUSTLLVM) stage1/lib/main.o
 	$(S)src/etc/make-snapshot.py stage1
 
 snap-stage2: stage2/rustc$(X) stage2/lib/glue.o stage2/lib/$(CFG_STDLIB) \
 	stage2/lib/libstd.rlib stage2/lib/$(CFG_RUNTIME) \
-	stage2/$(CFG_RUSTLLVM)
+	stage2/$(CFG_RUSTLLVM) stage2/lib/main.o
 	$(S)src/etc/make-snapshot.py stage2
 
 snap-stage3: stage3/rustc$(X) stage3/lib/glue.o stage3/lib/$(CFG_STDLIB) \
 	stage3/lib/libstd.rlib stage3/lib/$(CFG_RUNTIME) \
-	stage3/$(CFG_RUSTLLVM)
+	stage3/$(CFG_RUSTLLVM) stage3/lib/main.o
 	$(S)src/etc/make-snapshot.py stage3
 
diff --git a/src/etc/get-snapshot.py b/src/etc/get-snapshot.py
index 98e480defda..aa64a4fb49a 100755
--- a/src/etc/get-snapshot.py
+++ b/src/etc/get-snapshot.py
@@ -9,7 +9,7 @@ def unpack_snapshot(snap):
   print("opening snapshot " + dl_path)
   tar = tarfile.open(dl_path)
   kernel = get_kernel()
-  for name in snapshot_files[kernel]:
+  for name in old_snapshot_files[kernel]:
     p = "rust-stage0/" + name
     fp = os.path.join("stage0", name)
     print("extracting " + fp)
diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py
index 45704e02567..5c6d7c8e0af 100644
--- a/src/etc/snapshot.py
+++ b/src/etc/snapshot.py
@@ -15,7 +15,7 @@ download_url_base = "http://dl.rust-lang.org/stage0-snapshots"
 download_dir_base = "dl"
 download_unpack_base = os.path.join(download_dir_base, "unpack")
 
-snapshot_files = {
+old_snapshot_files = {
     "linux": ["rustc", "lib/glue.o", "lib/libstd.so",
               "librustrt.so", "librustllvm.so", "lib/intrinsics.bc"],
     "macos": ["rustc", "lib/glue.o", "lib/libstd.dylib",
@@ -24,6 +24,15 @@ snapshot_files = {
               "rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
     }
 
+snapshot_files = {
+    "linux": ["rustc", "lib/glue.o", "lib/libstd.so", "lib/main.o",
+              "librustrt.so", "librustllvm.so", "lib/intrinsics.bc"],
+    "macos": ["rustc", "lib/glue.o", "lib/libstd.dylib", "lib/main.o",
+              "librustrt.dylib", "librustllvm.dylib", "lib/intrinsics.bc"],
+    "winnt": ["rustc.exe", "lib/glue.o", "lib/std.dll", "lib/main.o"
+              "rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
+    }
+
 def parse_line(n, line):
   global snapshotfile