snap-stage1: $(HSREQ1_H_$(CFG_HOST_TRIPLE))
- $(S)src/etc/make-snapshot.py $(CFG_HOST_TRIPLE)/stage1
+ $(S)src/etc/make-snapshot.py stage1 $(CFG_HOST_TRIPLE)
snap-stage2: $(HSREQ2_H_$(CFG_HOST_TRIPLE)
- $(S)src/etc/make-snapshot.py $(CFG_HOST_TRIPLE)/stage2
+ $(S)src/etc/make-snapshot.py stage2 $(CFG_HOST_TRIPLE)
snap-stage3: $(HSREQ3_H_$(CFG_HOST_TRIPLE)
- $(S)src/etc/make-snapshot.py $(CFG_HOST_TRIPLE)/stage3
+ $(S)src/etc/make-snapshot.py stage3 $(CFG_HOST_TRIPLE)
tar.close()
shutil.rmtree(download_unpack_base)
-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
% (date, rev, platform, hsh))
-def get_kernel():
- if os.name == "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):
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]
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)
tar.close()