@@ -27,20 +27,28 @@ WFLAGS_ST2 = -D warnings
27
27
# $(2) is the target triple
28
28
# $(3) is the host triple
29
29
30
+ # Every recipe in TARGET_STAGE_N outputs to $$(TLIB$(1)_T_$(2)_H_$(3),
31
+ # a directory that can be cleaned out during the middle of a run of
32
+ # the get-snapshot.py script. Therefore, every recipe needs to have
33
+ # an order-only dependency either on $(SNAPSHOT_RUSTC_POST_CLEANUP) or
34
+ # on $$(TSREQ$(1)_T_$(2)_H_$(3)), to ensure that no products will be
35
+ # put into the target area until after the get-snapshot.py script has
36
+ # had its chance to clean it out; otherwise the other products will be
37
+ # inadvertantly included in the clean out.
30
38
31
39
define TARGET_STAGE_N
32
40
33
41
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /libmorestack.a: \
34
42
rt/$(2 ) /stage$(1 ) /arch/$$(HOST_$(2 ) ) /libmorestack.a \
35
43
| $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) / \
36
- $(HBIN0_H_ $( CFG_BUILD_TRIPLE ) ) /rustc $( X_ $( CFG_BUILD_TRIPLE ) )
44
+ $(SNAPSHOT_RUSTC_POST_CLEANUP )
37
45
@$$(call E, cp: $$@ )
38
46
$$(Q ) cp $$< $$@
39
47
40
48
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /$(CFG_RUNTIME_$(2 ) ) : \
41
49
rt/$(2 ) /stage$(1 ) /$(CFG_RUNTIME_$(2 ) ) \
42
50
| $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) / \
43
- $(HBIN0_H_ $( CFG_BUILD_TRIPLE ) ) /rustc $( X_ $( CFG_BUILD_TRIPLE ) )
51
+ $(SNAPSHOT_RUSTC_POST_CLEANUP )
44
52
@$$(call E, cp: $$@ )
45
53
$$(Q ) cp $$< $$@
46
54
@@ -80,7 +88,7 @@ ifneq ($$(findstring $(2),$$(CFG_HOST_TRIPLES)),)
80
88
$$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) /$(CFG_RUSTLLVM_$(3 ) ) : \
81
89
rustllvm/$(2 ) /$(CFG_RUSTLLVM_$(3 ) ) \
82
90
| $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) / \
83
- $(HBIN0_H_ $( CFG_BUILD_TRIPLE ) ) /rustc $( X_ $( CFG_BUILD_TRIPLE ) )
91
+ $(SNAPSHOT_RUSTC_POST_CLEANUP )
84
92
@$$(call E, cp: $$@ )
85
93
$$(Q ) cp $$< $$@
86
94
0 commit comments