Skip to content

Commit f3149b2

Browse files
committed
Merge branch 'use-new-rustrt'
2 parents 3b2d23b + bdbac00 commit f3149b2

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

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

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: $$@)

src/etc/snapshot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ def scrub(b):
1717

1818
snapshot_files = {
1919
"linux": ["rustc", "lib/glue.o", "lib/libstd.so",
20-
"lib/librustrt.so", "librustllvm.so", "lib/intrinsics.bc"],
20+
"librustrt.so", "librustllvm.so", "lib/intrinsics.bc"],
2121
"macos": ["rustc", "lib/glue.o", "lib/libstd.dylib",
22-
"lib/librustrt.dylib", "librustllvm.dylib", "lib/intrinsics.bc"],
22+
"librustrt.dylib", "librustllvm.dylib", "lib/intrinsics.bc"],
2323
"winnt": ["rustc.exe", "lib/glue.o", "lib/std.dll",
24-
"lib/rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
24+
"rustrt.dll", "rustllvm.dll", "lib/intrinsics.bc"]
2525
}
2626

2727
def parse_line(n, line):

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)