Commit 44ccc36d authored by Niko Matsakis's avatar Niko Matsakis

update snapshot scripts

parent 4b13fdbf
snap-stage1: $(HSREQ1_H_$(CFG_HOST_TRIPLE))
$(S)src/etc/ $(CFG_HOST_TRIPLE)/stage1
$(S)src/etc/ stage1 $(CFG_HOST_TRIPLE)
snap-stage2: $(HSREQ2_H_$(CFG_HOST_TRIPLE)
$(S)src/etc/ $(CFG_HOST_TRIPLE)/stage2
$(S)src/etc/ stage2 $(CFG_HOST_TRIPLE)
snap-stage3: $(HSREQ3_H_$(CFG_HOST_TRIPLE)
$(S)src/etc/ $(CFG_HOST_TRIPLE)/stage3
$(S)src/etc/ stage3 $(CFG_HOST_TRIPLE)
......@@ -20,10 +20,9 @@ def unpack_snapshot(snap):
def determine_curr_snapshot_for_platform():
def determine_curr_snapshot(triple):
i = 0
platform = get_platform()
platform = get_platform(triple)
found_file = False
found_snap = False
#!/usr/bin/env python
import snapshot, sys
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2]))
......@@ -54,22 +54,22 @@ def full_snapshot_name(date, rev, platform, hsh):
% (date, rev, platform, hsh))
def get_kernel():
if == "nt" or scrub(os.getenv("CFG_ENABLE_MINGW_CROSS")):
def get_kernel(triple):
os_name = triple.split('-')[-1]
if os_name == "nt" or scrub(os.getenv("CFG_ENABLE_MINGW_CROSS")):
return "winnt"
kernel = os.uname()[0].lower()
if kernel == "darwin":
kernel = "macos"
return kernel
if os_name == "darwin":
return "macos"
return "linux"
def get_cpu(triple):
arch = triple.split('-')[0]
if arch == "i686":
return "i386"
return arch
def get_cpu():
# return os.uname()[-1].lower()
return "i386"
def get_platform():
return "%s-%s" % (get_kernel(), get_cpu())
def get_platform(triple):
return "%s-%s" % (get_kernel(triple), get_cpu(triple))
def cmd_out(cmdline):
......@@ -110,9 +110,9 @@ def hash_file(x):
return scrub(h.hexdigest())
def make_snapshot(stage):
kernel = get_kernel()
platform = get_platform()
def make_snapshot(stage, triple):
kernel = get_kernel(triple)
platform = get_platform(triple)
rev = local_rev_short_sha()
date = local_rev_committer_date().split()[0]
......@@ -123,7 +123,7 @@ def make_snapshot(stage):
dir = stage
if stage == "stage1" and re.match(r"^lib/(lib)?std.*", name):
dir = "stage0"
tar.add(os.path.join(dir, name),
tar.add(os.path.join(triple, os.path.join(dir, name)),
"rust-stage0/" + name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment