Skip to content

Commit def59ea

Browse files
committed
---
yaml --- r: 4056 b: refs/heads/master c: bdbac00 h: refs/heads/master v: v3
1 parent 9ebe43f commit def59ea

File tree

6 files changed

+22
-30
lines changed

6 files changed

+22
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c62a9fec775a2f0fba5980fb13329bed57a1b118
2+
refs/heads/master: bdbac006dc27d75202fea5ccb1141b3bcae3a9dd

trunk/mk/stage0.mk

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# FIXME: temporary hack: stdlib comes in the lib/ directory, but we want it in
2-
# the base directory, so we move it out.
1+
# FIXME: temporary hack: stdlib and rustrt come in the lib/ directory,
2+
# but we want them in the base directory, so we move them out.
33
stage0/rustc$(X): $(S)src/snapshots.txt $(S)src/etc/get-snapshot.py $(MKFILES)
44
@$(call E, fetch: $@)
55
$(Q)$(S)src/etc/get-snapshot.py
@@ -8,11 +8,8 @@ stage0/rustc$(X): $(S)src/snapshots.txt $(S)src/etc/get-snapshot.py $(MKFILES)
88

99
# Host libs will be made in the process of making rustc above.
1010

11-
# FIXME: temporary hack: the runtime is currently carried in
12-
# lib/ directory only, so we copy it out.
13-
14-
stage0/$(CFG_RUNTIME): stage0/lib/$(CFG_RUNTIME)
15-
$(Q)cp $< $@
11+
stage0/$(CFG_RUNTIME): stage0/rustc$(X)
12+
$(Q)touch $@
1613

1714
stage0/$(CFG_STDLIB): stage0/rustc$(X)
1815
$(Q)touch $@
@@ -31,12 +28,8 @@ stage0/lib/glue.o: stage0/rustc$(X)
3128
stage0/lib/main.o: rt/main.o
3229
$(Q)cp $< $@
3330

34-
35-
stage0/lib/$(CFG_RUNTIME): stage0/rustc$(X)
36-
$(Q)touch $@
37-
3831
# Instantiate template (in stageN.mk) for building
3932
# stage0/lib/$(CFG_STDLIB) and stage0/lib/libstd.rlib.
4033
SREQpre = stage0/lib/main.o $(MKFILES)
41-
$(eval $(call STDLIBGEN,pre,0))
34+
$(eval $(call LIBGEN,pre,0))
4235

trunk/mk/stageN.mk

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
# The easiest way to read this template is to assume we're building stage2
44
# using stage1, and mentally gloss $(1) as 1, $(2) as 2.
55
#
6-
# STDLIBGEN is pulled out seperately because we need to specially invoke
7-
# it to build stage0/lib/libstd using stage0/rustc.
6+
# LIBGEN is pulled out seperately because we need to specially invoke
7+
# it to build stage0/lib/libstd using stage0/rustc and to use the
8+
# new rustrt in stage0/lib/.
89

9-
define STDLIBGEN
10+
define LIBGEN
1011
stage$(2)/lib/$$(CFG_STDLIB): $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
1112
stage$(2)/rustc$$(X) \
1213
stage$(2)/$$(CFG_RUNTIME) \
@@ -24,6 +25,11 @@ stage$(2)/lib/libstd.rlib: $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
2425
$$(SREQ$(1))
2526
@$$(call E, compile_and_link: $$@)
2627
$$(STAGE$(2)) --lib --static -o $$@ $$<
28+
29+
stage$(2)/lib/$$(CFG_RUNTIME): rt/$$(CFG_RUNTIME)
30+
@$$(call E, cp: $$@)
31+
$$(Q)cp $$< $$@
32+
2733
endef
2834

2935
define STAGEN
@@ -79,16 +85,12 @@ stage$(2)/lib/glue.o: stage$(2)/rustc$$(X) \
7985
@$$(call E, generate: $$@)
8086
$$(STAGE$(2)) -c -o $$@ --glue
8187

82-
$(eval $(call STDLIBGEN,$(1),$(2)))
88+
$(eval $(call LIBGEN,$(1),$(2)))
8389

8490
stage$(2)/lib/main.o: rt/main.o
8591
@$$(call E, cp: $$@)
8692
$$(Q)cp $$< $$@
8793

88-
stage$(2)/lib/$$(CFG_RUNTIME): rt/$$(CFG_RUNTIME)
89-
@$$(call E, cp: $$@)
90-
$$(Q)cp $$< $$@
91-
9294
stage$(2)/lib/$$(CFG_LIBRUSTC): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
9395
$$(SREQ$(2))
9496
@$$(call E, compile_and_link: $$@)

trunk/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 old_snapshot_files[kernel]:
12+
for name in snapshot_files[kernel]:
1313
p = "rust-stage0/" + name
1414
fp = os.path.join("stage0", name)
1515
print("extracting " + fp)

trunk/src/etc/snapshot.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ def scrub(b):
2323
"winnt": ["rustc.exe", "lib/glue.o", "lib/std.dll",
2424
"rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
2525
}
26-
old_snapshot_files = {
27-
"linux": ["rustc", "lib/glue.o", "lib/libstd.so",
28-
"lib/librustrt.so", "librustllvm.so", "lib/intrinsics.bc"],
29-
"macos": ["rustc", "lib/glue.o", "lib/libstd.dylib",
30-
"lib/librustrt.dylib", "librustllvm.dylib", "lib/intrinsics.bc"],
31-
"winnt": ["rustc.exe", "lib/glue.o", "lib/std.dll",
32-
"lib/rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
33-
}
3426

3527
def parse_line(n, line):
3628
global snapshotfile

trunk/src/snapshots.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
S 2011-07-21 c62a9fe
2+
linux-i386 3c8f658093adea1cb0e5b84150d3d342571013b4
3+
macos-i386 1833b475fd1adec3df02ab3dd2fb7c6f280a33a5
4+
winnt-i386 f6b6b42d00f25d82603b9466229d3229bfce3317
5+
16
S 2011-07-20 8a7f2e0
27
linux-i386 c4881df0302a4a1e126a7ea847e1d7b4de49b943
38
macos-i386 d5d486af50fade251fd04a24062385d67cfff30a

0 commit comments

Comments
 (0)