Skip to content

Commit 3bbfe51

Browse files
committed
make convenient rustc targets
1 parent 9acc2bf commit 3bbfe51

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Makefile.in

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,25 @@ $(foreach build,$(CFG_TARGET_TRIPLES), \
324324
$(eval $(foreach stage,$(STAGES), \
325325
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
326326

327+
######################################################################
328+
# rustc-H-targets
329+
#
330+
# Builds a functional Rustc for the given host.
331+
######################################################################
332+
333+
define DEF_RUSTC_TARGET
334+
# $(1) == architecture
335+
336+
rustc-H-$(1): \
337+
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
338+
$$(SREQ3_T_$$(target)_H_$(1)))
339+
endef
340+
341+
$(foreach host,$(CFG_TARGET_TRIPLES), \
342+
$(eval $(call DEF_RUSTC_TARGET,$(host))))
343+
344+
all-rustcs: $(foreach host,$(CFG_TARGET_TRIPLES),rustc-H-$(host))
345+
327346
######################################################################
328347
# Entrypoint rule
329348
######################################################################
@@ -345,8 +364,7 @@ TSREQS := \
345364
FUZZ := $(HBIN3_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
346365
CARGO := $(HBIN3_H_$(CFG_HOST_TRIPLE))/cargo$(X)
347366

348-
#all: $(SREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) $(DOCS) $(FUZZ)
349-
all: $(TSREQS) $(GENERATED) $(DOCS) $(FUZZ) $(CARGO)
367+
all: rustc-H-$(CFG_HOST_TRIPLE) $(GENERATED) $(DOCS) $(FUZZ) $(CARGO)
350368

351369
endif
352370

0 commit comments

Comments
 (0)