build: Temp hack to make transition to new snapshot
This commit is contained in:
parent
03d1644acc
commit
2ba317ddb2
12
mk/stage0.mk
12
mk/stage0.mk
@ -13,13 +13,21 @@ $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUNTIME): \
|
||||
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
## FIXME temporary hack for snapshot transition
|
||||
CORELIB_DUMMY :=$(call CFG_LIB_NAME,core-dummy)
|
||||
STDLIB_DUMMY :=$(call CFG_LIB_NAME,std-dummy)
|
||||
|
||||
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_CORELIB): \
|
||||
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES),\
|
||||
$(shell touch $(CFG_HOST_TRIPLE)/stage0/lib/rustc/$(target)/lib/$(CORELIB_DUMMY)))
|
||||
|
||||
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \
|
||||
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES),\
|
||||
$(shell touch $(CFG_HOST_TRIPLE)/stage0/lib/rustc/$(target)/lib/$(STDLIB_DUMMY)))
|
||||
|
||||
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUSTLLVM): \
|
||||
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
||||
@ -45,12 +53,12 @@ $$(HLIB0_H_$(1))/$$(CFG_RUNTIME): \
|
||||
$$(HLIB0_H_$(1))/$(CFG_CORELIB): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_CORELIB)
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CORELIB_GLOB) $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_STDLIB): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_STDLIB)
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(STDLIB_GLOB) $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUSTLLVM)
|
||||
|
@ -3,13 +3,30 @@
|
||||
import os, tarfile, hashlib, re, shutil, sys
|
||||
from snapshot import *
|
||||
|
||||
old_snapshot_files = {
|
||||
"linux": ["bin/rustc",
|
||||
"lib/libcore.so",
|
||||
"lib/libruststd.so",
|
||||
"lib/librustrt.so",
|
||||
"lib/librustllvm.so"],
|
||||
"macos": ["bin/rustc",
|
||||
"lib/libcore.dylib",
|
||||
"lib/libruststd.dylib",
|
||||
"lib/librustrt.dylib",
|
||||
"lib/librustllvm.dylib"],
|
||||
"winnt": ["bin/rustc.exe",
|
||||
"lib/core.dll",
|
||||
"lib/ruststd.dll",
|
||||
"lib/rustrt.dll",
|
||||
"lib/rustllvm.dll"]
|
||||
}
|
||||
|
||||
def unpack_snapshot(triple, snap):
|
||||
dl_path = os.path.join(download_dir_base, snap)
|
||||
print("opening snapshot " + dl_path)
|
||||
tar = tarfile.open(dl_path)
|
||||
kernel = get_kernel(triple)
|
||||
for name in snapshot_files[kernel]:
|
||||
for name in old_snapshot_files[kernel]:
|
||||
p = "rust-stage0/" + name
|
||||
stagep = os.path.join(triple, "stage0")
|
||||
fp = os.path.join(stagep, name)
|
||||
|
Loading…
Reference in New Issue
Block a user