Skip to content

Commit abb5c65

Browse files
committed
mk: Remove USE_SNAPSHOT_RT, etc. Obsolete. rust-lang#4713
1 parent ab0b7b2 commit abb5c65

File tree

1 file changed

+0
-125
lines changed

1 file changed

+0
-125
lines changed

mk/target.mk

Lines changed: 0 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
# $(2) is the target triple
1515
# $(3) is the host triple
1616

17-
# If you are making non-backwards compatible changes to the runtime
18-
# (resp. corelib), set this flag to 1. It will cause stage1 to use
19-
# the snapshot runtime (resp. corelib) rather than the runtime
20-
# (resp. corelib) from the working directory.
21-
USE_SNAPSHOT_RUNTIME=0
22-
USE_SNAPSHOT_CORELIB=0
23-
USE_SNAPSHOT_STDLIB=0
2417

2518
define TARGET_STAGE_N
2619

@@ -59,86 +52,17 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
5952
@$$(call E, compile_and_link: $$@)
6053
$$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) -o $$@ $$< && touch $$@
6154

62-
endef
63-
64-
# The stage0 (snapshot) compiler produces binaries that expect the
65-
# snapshot runtime. Normally the working directory runtime and
66-
# snapshot runtime are compatible, so this is no problem. But
67-
# sometimes we want to make non-backwards-compatible changes. In
68-
# those cases, the stage1 compiler and libraries (which are produced
69-
# by stage0) should use the runtime from the snapshot. The stage2
70-
# compiler and libraries (which are produced by stage1) will be the
71-
# first that are expecting to run against the runtime as defined in
72-
# the working directory.
73-
#
74-
# The catch is that you may not add new functions to the runtime
75-
# in this case!
76-
#
77-
# Arguments are the same as for TARGET_BASE_STAGE_N
78-
define TARGET_RT_FROM_SNAPSHOT
79-
80-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME): \
81-
$$(HLIB$(1)_H_$(3))/$$(CFG_RUNTIME)
82-
@$$(call E, cp: $$@)
83-
$$(Q)cp $$< $$@
84-
85-
endef
86-
87-
# This rule copies from the runtime for the working directory. It
88-
# applies to targets produced by stage1 or later. See comment on
89-
# previous rule.
90-
#
91-
# Arguments are the same as for TARGET_BASE_STAGE_N
92-
define TARGET_RT_FROM_WD
93-
9455
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME): \
9556
rt/$(2)/$$(CFG_RUNTIME)
9657
@$$(call E, cp: $$@)
9758
$$(Q)cp $$< $$@
9859

99-
endef
100-
101-
# As above, but builds the corelib either by taking it out of the
102-
# snapshot or from the working directory.
103-
104-
define TARGET_CORELIB_FROM_SNAPSHOT
105-
106-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB): \
107-
$$(HLIB$(1)_H_$(3))/$$(CFG_CORELIB) \
108-
$$(CORELIB_INPUTS) \
109-
$$(TSREQ$(1)_T_$(2)_H_$(3))
110-
@$$(call E, cp: $$@)
111-
$$(Q)cp $$< $$@
112-
$$(Q)cp $$(HLIB$(1)_H_$(3))/$$(CORELIB_GLOB) \
113-
$$(TLIB$(1)_T_$(2)_H_$(3))
114-
115-
endef
116-
117-
define TARGET_CORELIB_FROM_WD
118-
11960
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB): \
12061
$$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
12162
$$(TSREQ$(1)_T_$(2)_H_$(3))
12263
@$$(call E, compile_and_link: $$@)
12364
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
12465

125-
endef
126-
127-
define TARGET_STDLIB_FROM_SNAPSHOT
128-
129-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB): \
130-
$$(HLIB$(1)_H_$(3))/$$(CFG_STDLIB) \
131-
$$(STDLIB_INPUTS) \
132-
$$(TSREQ$(1)_T_$(2)_H_$(3))
133-
@$$(call E, cp: $$@)
134-
$$(Q)cp $$< $$@
135-
$$(Q)cp $$(HLIB$(1)_H_$(3))/$$(STDLIB_GLOB) \
136-
$$(TLIB$(1)_T_$(2)_H_$(3))
137-
138-
endef
139-
140-
define TARGET_STDLIB_FROM_WD
141-
14266
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB): \
14367
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
14468
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
@@ -155,52 +79,3 @@ $(foreach source,$(CFG_TARGET_TRIPLES), \
15579
$(eval $(call TARGET_STAGE_N,1,$(target),$(source))) \
15680
$(eval $(call TARGET_STAGE_N,2,$(target),$(source))) \
15781
$(eval $(call TARGET_STAGE_N,3,$(target),$(source)))))
158-
159-
# Host triple either uses the snapshot runtime or runtime from
160-
# working directory, depending on the USE_SNAPSHOT_RUNTIME var.
161-
ifeq ($(USE_SNAPSHOT_RUNTIME),1)
162-
$(foreach src,$(CFG_HOST_TRIPLE),\
163-
$(eval $(call TARGET_RT_FROM_SNAPSHOT,0,$(src),$(src))))
164-
else
165-
$(foreach src,$(CFG_HOST_TRIPLE),\
166-
$(eval $(call TARGET_RT_FROM_WD,0,$(src),$(src))))
167-
endif
168-
169-
ifeq ($(USE_SNAPSHOT_CORELIB),1)
170-
$(foreach src,$(CFG_HOST_TRIPLE),\
171-
$(eval $(call TARGET_CORELIB_FROM_SNAPSHOT,0,$(src),$(src))))
172-
else
173-
$(foreach src,$(CFG_HOST_TRIPLE),\
174-
$(eval $(call TARGET_CORELIB_FROM_WD,0,$(src),$(src))))
175-
endif
176-
177-
ifeq ($(USE_SNAPSHOT_STDLIB),1)
178-
$(foreach src,$(CFG_HOST_TRIPLE),\
179-
$(eval $(call TARGET_STDLIB_FROM_SNAPSHOT,0,$(src),$(src))))
180-
else
181-
$(foreach src,$(CFG_HOST_TRIPLE),\
182-
$(eval $(call TARGET_STDLIB_FROM_WD,0,$(src),$(src))))
183-
endif
184-
185-
# Non-host triples build the stage0 runtime from the working directory
186-
$(foreach source,$(CFG_TARGET_TRIPLES), \
187-
$(foreach target,$(NON_HOST_TRIPLES), \
188-
$(eval $(call TARGET_RT_FROM_WD,0,$(target),$(source))) \
189-
$(eval $(call TARGET_CORELIB_FROM_WD,0,$(target),$(source))) \
190-
$(eval $(call TARGET_STDLIB_FROM_WD,0,$(target),$(source))) \
191-
))
192-
193-
# After stage0, always build the stage0 runtime from the working directory
194-
$(foreach source,$(CFG_TARGET_TRIPLES), \
195-
$(foreach target,$(CFG_TARGET_TRIPLES), \
196-
$(eval $(call TARGET_RT_FROM_WD,1,$(target),$(source))) \
197-
$(eval $(call TARGET_RT_FROM_WD,2,$(target),$(source))) \
198-
$(eval $(call TARGET_RT_FROM_WD,3,$(target),$(source))) \
199-
$(eval $(call TARGET_CORELIB_FROM_WD,1,$(target),$(source))) \
200-
$(eval $(call TARGET_CORELIB_FROM_WD,2,$(target),$(source))) \
201-
$(eval $(call TARGET_CORELIB_FROM_WD,3,$(target),$(source))) \
202-
$(eval $(call TARGET_STDLIB_FROM_WD,1,$(target),$(source))) \
203-
$(eval $(call TARGET_STDLIB_FROM_WD,2,$(target),$(source))) \
204-
$(eval $(call TARGET_STDLIB_FROM_WD,3,$(target),$(source))) \
205-
))
206-

0 commit comments

Comments
 (0)