1 ######################################################################
3 ######################################################################
5 ALL_TEST_INPUTS = $(wildcard $(S)src/test/*/*.rs \
6 $(S)src/test/*/*/*.rs \
9 RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
10 RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
11 RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
12 RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
13 CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
14 CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
15 BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
16 PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
18 # perf tests are the same as bench tests only they run under
19 # a performance monitor.
20 PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
22 RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
23 RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS)
24 CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
25 BENCH_TESTS := $(BENCH_RS)
26 PERF_TESTS := $(PERF_RS)
27 PRETTY_TESTS := $(PRETTY_RS)
30 FT_LIB := $(call CFG_LIB_NAME,$(FT))
31 FT_DRIVER := $(FT)_driver
33 # The arguments to all test runners
35 TESTARGS += $(TESTNAME)
42 # Arguments to the cfail/rfail/rpass/bench tests
44 CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
47 # Arguments to the perf tests
49 CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
52 CTEST_TESTARGS := $(TESTARGS)
55 CTEST_TESTARGS += --verbose
58 # Run the compiletest runner itself under valgrind
60 CFG_RUN_CTEST=$(call CFG_RUN_TEST,$(2),$(3))
62 CFG_RUN_CTEST=$(call CFG_RUN,$(TLIB$(1)_T_$(3)_H_$(3)),$(2))
65 ######################################################################
67 ######################################################################
69 check: tidy all check-stage2 \
71 check-full: tidy all check-stage1 check-stage2 check-stage3 \
73 # Run the tidy script in multiple parts to avoid huge 'echo' commands
78 @$(call E, check: formatting)
80 $(addprefix $(S)src/, $(RUSTLLVM_LIB_CS) $(RUSTLLVM_OBJS_CS) \
82 $(RUNTIME_CS) $(RUNTIME_HDR) $(RUNTIME_S)) \
83 $(wildcard $(S)src/etc/*.py) \
90 $(COMPILETEST_CRATE) \
91 $(COMPILETEST_INPUTS) \
96 | xargs -n 10 python $(S)src/etc/tidy.py
99 | xargs -n 10 python $(S)src/etc/tidy.py
103 ######################################################################
104 # Extracting tests for docs
105 ######################################################################
107 EXTRACT_TESTS := "$(CFG_PYTHON)" $(S)src/etc/extract-tests.py
109 define DEF_DOC_TEST_HOST
111 doc-tutorial-extract$(1):
112 @$$(call E, extract: tutorial tests)
113 $$(Q)rm -f $(1)/test/doc-tutorial/*.rs
114 $$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial.md $(1)/test/doc-tutorial
118 $(foreach host,$(CFG_TARGET_TRIPLES), \
119 $(eval $(call DEF_DOC_TEST_HOST,$(host))))
121 ######################################################################
122 # Rules for the test runners
123 ######################################################################
127 # All the per-stage build rules you might want to call from the
130 # $(1) is the stage number
131 # $(2) is the target triple to test
132 # $(3) is the host triple to test
134 check-stage$(1)-T-$(2)-H-$(3): tidy \
135 check-stage$(1)-T-$(2)-H-$(3)-rustc \
136 check-stage$(1)-T-$(2)-H-$(3)-core \
137 check-stage$(1)-T-$(2)-H-$(3)-std \
138 check-stage$(1)-T-$(2)-H-$(3)-rpass \
139 check-stage$(1)-T-$(2)-H-$(3)-rfail \
140 check-stage$(1)-T-$(2)-H-$(3)-cfail \
141 check-stage$(1)-T-$(2)-H-$(3)-bench \
142 check-stage$(1)-T-$(2)-H-$(3)-pretty \
143 check-stage$(1)-T-$(2)-H-$(3)-rustdoc \
144 check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial
146 check-stage$(1)-T-$(2)-H-$(3)-core: \
147 check-stage$(1)-T-$(2)-H-$(3)-core-dummy
149 check-stage$(1)-T-$(2)-H-$(3)-std: \
150 check-stage$(1)-T-$(2)-H-$(3)-std-dummy
152 check-stage$(1)-T-$(2)-H-$(3)-rustc: \
153 check-stage$(1)-T-$(2)-H-$(3)-rustc-dummy
155 check-stage$(1)-T-$(2)-H-$(3)-cfail: \
156 check-stage$(1)-T-$(2)-H-$(3)-cfail-dummy
158 check-stage$(1)-T-$(2)-H-$(3)-rfail: \
159 check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy
161 check-stage$(1)-T-$(2)-H-$(3)-rpass: \
162 check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy
164 check-stage$(1)-T-$(2)-H-$(3)-bench: \
165 check-stage$(1)-T-$(2)-H-$(3)-bench-dummy
167 check-stage$(1)-T-$(2)-H-$(3)-perf: \
168 check-stage$(1)-T-$(2)-H-$(3)-perf-dummy
170 check-stage$(1)-T-$(2)-H-$(3)-pretty: \
171 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass \
172 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail \
173 check-stage$(1)-T-$(2)-H-$(3)-pretty-bench \
174 check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty
176 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass: \
177 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy
179 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail: \
180 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy
182 check-stage$(1)-T-$(2)-H-$(3)-pretty-bench: \
183 check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-dummy
185 check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty: \
186 check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-dummy
188 check-stage$(1)-T-$(2)-H-$(3)-rustdoc: \
189 check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy
191 check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial: \
192 check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-dummy
194 # Rules for the core library test runner
196 $(3)/test/coretest.stage$(1)-$(2)$$(X): \
197 $$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
198 $$(SREQ$(1)_T_$(2)_H_$(3))
199 @$$(call E, compile_and_link: $$@)
200 $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
202 check-stage$(1)-T-$(2)-H-$(3)-core-dummy: \
203 $(3)/test/coretest.stage$(1)-$(2)$$(X)
204 @$$(call E, run: $$<)
205 $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS)
207 # Rules for the standard library test runner
209 $(3)/test/stdtest.stage$(1)-$(2)$$(X): \
210 $$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
211 $$(SREQ$(1)_T_$(2)_H_$(3))
212 @$$(call E, compile_and_link: $$@)
213 $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
215 check-stage$(1)-T-$(2)-H-$(3)-std-dummy: \
216 $(3)/test/stdtest.stage$(1)-$(2)$$(X)
217 @$$(call E, run: $$<)
218 $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS)
220 # Rules for the rustc test runner
222 $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
224 $$(COMPILER_INPUTS) \
225 $$(SREQ$(1)_T_$(2)_H_$(3)) \
226 $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
227 @$$(call E, compile_and_link: $$@)
228 $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
230 check-stage$(1)-T-$(2)-H-$(3)-rustc-dummy: \
231 $(3)/test/rustctest.stage$(1)-$(2)$$(X)
232 @$$(call E, run: $$<)
233 $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS)
235 # Rules for the rustdoc test runner
237 $(3)/test/rustdoctest.stage$(1)-$(2)$$(X): \
238 $$(RUSTDOC_CRATE) $$(RUSTDOC_INPUTS) \
239 $$(TSREQ$(1)_T_$(2)_H_$(3)) \
240 $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
241 $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
242 $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
243 @$$(call E, compile_and_link: $$@)
244 $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
246 check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy: \
247 $(3)/test/rustdoctest.stage$(1)-$(2)$$(X)
248 @$$(call E, run: $$<)
249 $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS)
251 # Rules for the cfail/rfail/rpass/bench/perf test runner
253 CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
254 --compile-lib-path $$(HLIB$(1)_H_$(3)) \
255 --run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
256 --rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X) \
257 --aux-base $$(S)src/test/auxiliary/ \
258 --stage-id stage$(1)-$(2) \
259 --rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \
262 CFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
263 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
264 --src-base $$(S)src/test/compile-fail/ \
265 --build-base $(3)/test/compile-fail/ \
268 RFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
269 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
270 --src-base $$(S)src/test/run-fail/ \
271 --build-base $(3)/test/run-fail/ \
275 RPASS_ARGS$(1)-T-$(2)-H-$(3) := \
276 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
277 --src-base $$(S)src/test/run-pass/ \
278 --build-base $(3)/test/run-pass/ \
282 BENCH_ARGS$(1)-T-$(2)-H-$(3) := \
283 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
284 --src-base $$(S)src/test/bench/ \
285 --build-base $(3)/test/bench/ \
289 PERF_ARGS$(1)-T-$(2)-H-$(3) := \
290 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
291 --src-base $$(S)src/test/bench/ \
292 --build-base $(3)/test/perf/ \
294 $$(CTEST_PERF_RUNTOOL)
296 PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3) := \
297 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
298 --src-base $$(S)src/test/run-pass/ \
299 --build-base $(3)/test/run-pass/ \
302 PRETTY_RFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
303 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
304 --src-base $$(S)src/test/run-fail/ \
305 --build-base $(3)/test/run-fail/ \
308 PRETTY_BENCH_ARGS$(1)-T-$(2)-H-$(3) := \
309 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
310 --src-base $$(S)src/test/bench/ \
311 --build-base $(3)/test/bench/ \
314 PRETTY_PRETTY_ARGS$(1)-T-$(2)-H-$(3) := \
315 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
316 --src-base $$(S)src/test/pretty/ \
317 --build-base $(3)/test/pretty/ \
320 DOC_TUTORIAL_ARGS$(1)-T-$(2)-H-$(3) := \
321 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
322 --src-base $(3)/test/doc-tutorial/ \
323 --build-base $(3)/test/doc-tutorial/ \
326 check-stage$(1)-T-$(2)-H-$(3)-cfail-dummy: \
327 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
328 $$(SREQ$(1)_T_$(2)_H_$(3)) \
330 @$$(call E, run cfail: $$<)
331 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
332 $$(CFAIL_ARGS$(1)-T-$(2)-H-$(3))
334 check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy: \
335 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
336 $$(SREQ$(1)_T_$(2)_H_$(3)) \
338 @$$(call E, run rfail: $$<)
339 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
340 $$(RFAIL_ARGS$(1)-T-$(2)-H-$(3))
342 check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy: \
343 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
344 $$(SREQ$(1)_T_$(2)_H_$(3)) \
346 @$$(call E, run rpass: $$<)
347 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
348 $$(RPASS_ARGS$(1)-T-$(2)-H-$(3))
350 check-stage$(1)-T-$(2)-H-$(3)-bench-dummy: \
351 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
352 $$(SREQ$(1)_T_$(2)_H_$(3)) \
354 @$$(call E, run bench: $$<)
355 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
356 $$(BENCH_ARGS$(1)-T-$(2)-H-$(3))
358 check-stage$(1)-T-$(2)-H-$(3)-perf-dummy: \
359 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
360 $$(SREQ$(1)_T_$(2)_H_$(3)) \
362 @$$(call E, perf: $$<)
363 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
364 $$(PERF_ARGS$(1)-T-$(2)-H-$(3))
366 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy: \
367 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
368 $$(SREQ$(1)_T_$(2)_H_$(3)) \
370 @$$(call E, run pretty-rpass: $$<)
371 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
372 $$(PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3))
374 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy: \
375 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
376 $$(SREQ$(1)_T_$(2)_H_$(3)) \
378 @$$(call E, run pretty-rfail: $$<)
379 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
380 $$(PRETTY_RFAIL_ARGS$(1)-T-$(2)-H-$(3))
382 check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-dummy: \
383 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
384 $$(SREQ$(1)_T_$(2)_H_$(3)) \
386 @$$(call E, run pretty-bench: $$<)
387 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
388 $$(PRETTY_BENCH_ARGS$(1)-T-$(2)-H-$(3))
390 check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-dummy: \
391 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
392 $$(SREQ$(1)_T_$(2)_H_$(3)) \
394 @$$(call E, run pretty-pretty: $$<)
395 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
396 $$(PRETTY_PRETTY_ARGS$(1)-T-$(2)-H-$(3))
398 check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-dummy: \
399 $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
400 $$(SREQ$(1)_T_$(2)_H_$(3)) \
401 doc-tutorial-extract$(3)
402 @$$(call E, run doc-tutorial: $$<)
403 $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
404 $$(DOC_TUTORIAL_ARGS$(1)-T-$(2)-H-$(3))
408 # Instantiate the template for stage 0, 1, 2, 3
410 $(foreach host,$(CFG_TARGET_TRIPLES), \
411 $(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
412 $(eval $(foreach stage,$(STAGES), \
413 $(eval $(call TEST_STAGEN,$(stage),$(target),$(host))))))))
415 ######################################################################
417 ######################################################################
419 GENERATED += tmp/$(FT).rc tmp/$(FT_DRIVER).rs
421 tmp/$(FT).rc tmp/$(FT_DRIVER).rs: \
423 $(S)src/etc/combine-tests.py
424 @$(call E, check: building combined stage2 test runner)
425 $(Q)$(S)src/etc/combine-tests.py
427 define DEF_CHECK_FAST_FOR_T_H
432 $$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
434 $$(SREQ2_T_$(2)_H_$(3))
435 @$$(call E, compile_and_link: $$@)
436 $$(STAGE2_T_$(2)_H_$(3)) --lib -o $$@ $$<
438 $(3)/test/$$(FT_DRIVER)-$(2)$$(X): \
439 tmp/$$(FT_DRIVER).rs \
440 $$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
441 $$(SREQ2_T_$(2)_H_$(3))
442 @$$(call E, compile_and_link: $$@ $$<)
443 $$(STAGE2_T_$(2)_H_$(3)) -L $$(TLIB2_T_$(2)_H_$(3)) -o $$@ $$<
445 $(3)/test/$$(FT_DRIVER)-$(2).out: \
446 $(3)/test/$$(FT_DRIVER)-$(2)$$(X) \
447 $$(SREQ2_T_$(2)_H_$(3))
448 $$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3))
450 check-fast-T-$(2)-H-$(3): tidy \
451 check-stage2-T-$(2)-H-$(3)-rustc \
452 check-stage2-T-$(2)-H-$(3)-std \
453 $(3)/test/$$(FT_DRIVER)-$(2).out
457 $(foreach host,$(CFG_TARGET_TRIPLES), \
458 $(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
459 $(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
461 ######################################################################
463 ######################################################################
465 define DEF_CHECK_FOR_STAGE_H
467 check-stage$(1)-H-$(2): \
468 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
469 check-stage$(1)-T-$$(target)-H-$(2))
470 check-stage$(1)-H-$(2)-perf: \
471 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
472 check-stage$(1)-T-$$(target)-H-$(2)-perf)
473 check-stage$(1)-H-$(2)-rustc: \
474 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
475 check-stage$(1)-T-$$(target)-H-$(2)-rustc)
476 check-stage$(1)-H-$(2)-core: \
477 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
478 check-stage$(1)-T-$$(target)-H-$(2)-core)
479 check-stage$(1)-H-$(2)-std: \
480 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
481 check-stage$(1)-T-$$(target)-H-$(2)-std)
482 check-stage$(1)-H-$(2)-rpass: \
483 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
484 check-stage$(1)-T-$$(target)-H-$(2)-rpass)
485 check-stage$(1)-H-$(2)-rfail: \
486 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
487 check-stage$(1)-T-$$(target)-H-$(2)-rfail)
488 check-stage$(1)-H-$(2)-cfail: \
489 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
490 check-stage$(1)-T-$$(target)-H-$(2)-cfail)
491 check-stage$(1)-H-$(2)-bench: \
492 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
493 check-stage$(1)-T-$$(target)-H-$(2)-bench)
494 check-stage$(1)-H-$(2)-pretty: \
495 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
496 check-stage$(1)-T-$$(target)-H-$(2)-pretty)
497 check-stage$(1)-H-$(2)-pretty-rpass: \
498 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
499 check-stage$(1)-T-$$(target)-H-$(2)-pretty-rpass)
500 check-stage$(1)-H-$(2)-pretty-rfail: \
501 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
502 check-stage$(1)-T-$$(target)-H-$(2)-pretty-rfail)
503 check-stage$(1)-H-$(2)-pretty-bench: \
504 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
505 check-stage$(1)-T-$$(target)-H-$(2)-pretty-bench)
506 check-stage$(1)-H-$(2)-pretty-pretty: \
507 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
508 check-stage$(1)-T-$$(target)-H-$(2)-pretty-pretty)
509 check-stage$(1)-H-$(2)-rustdoc: \
510 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
511 check-stage$(1)-T-$$(target)-H-$(2)-rustdoc)
512 check-stage$(1)-H-$(2)-doc-tutorial: \
513 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
514 check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial)
518 $(foreach stage,$(STAGES), \
519 $(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
520 $(eval $(call DEF_CHECK_FOR_STAGE_H,$(stage),$(target))))))
522 define DEF_CHECK_FAST_FOR_H
524 check-fast-H-$(1): check-fast-T-$(1)-H-$(1)
528 $(foreach target,$(CFG_TARGET_TRIPLES), \
529 $(eval $(call DEF_CHECK_FAST_FOR_H,$(target))))
531 define DEF_CHECK_ALL_FOR_STAGE
533 check-stage$(1)-H-all: \
534 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
535 check-stage$(1)-H-$$(target))
536 check-stage$(1)-H-all-perf: \
537 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
538 check-stage$(1)-H-$$(target)-perf)
539 check-stage$(1)-H-all-rustc: \
540 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
541 check-stage$(1)-H-$$(target)-rustc)
542 check-stage$(1)-H-all-core: \
543 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
544 check-stage$(1)-H-$$(target)-core)
545 check-stage$(1)-H-all-std: \
546 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
547 check-stage$(1)-H-$$(target)-std)
548 check-stage$(1)-H-all-rpass: \
549 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
550 check-stage$(1)-H-$$(target)-rpass)
551 check-stage$(1)-H-all-rfail: \
552 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
553 check-stage$(1)-H-$$(target)-rfail)
554 check-stage$(1)-H-all-cfail: \
555 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
556 check-stage$(1)-H-$$(target)-cfail)
557 check-stage$(1)-H-all-bench: \
558 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
559 check-stage$(1)-H-$$(target)-bench)
560 check-stage$(1)-H-all-pretty: \
561 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
562 check-stage$(1)-H-$$(target)-pretty)
563 check-stage$(1)-H-all-pretty-rpass: \
564 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
565 check-stage$(1)-H-$$(target)-pretty-rpass)
566 check-stage$(1)-H-all-pretty-rfail: \
567 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
568 check-stage$(1)-H-$$(target)-pretty-rfail)
569 check-stage$(1)-H-all-pretty-bench: \
570 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
571 check-stage$(1)-H-$$(target)-pretty-bench)
572 check-stage$(1)-H-all-pretty-pretty: \
573 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
574 check-stage$(1)-H-$$(target)-pretty-pretty)
575 check-stage$(1)-H-all-rustdoc: \
576 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
577 check-stage$(1)-H-$$(target)-rustdoc)
578 check-stage$(1)-H-all-doc-tutorial: \
579 $$(foreach target,$$(CFG_TARGET_TRIPLES), \
580 check-stage$(1)-H-$$(target)-doc-tutorial)
584 $(foreach stage,$(STAGES), \
585 $(eval $(call DEF_CHECK_ALL_FOR_STAGE,$(stage))))
587 define DEF_CHECK_FOR_STAGE
589 check-stage$(1): check-stage$(1)-H-$$(CFG_HOST_TRIPLE)
590 check-stage$(1)-perf: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-perf
591 check-stage$(1)-rustc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustc
592 check-stage$(1)-core: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-core
593 check-stage$(1)-std: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-std
594 check-stage$(1)-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass
595 check-stage$(1)-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rfail
596 check-stage$(1)-cfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-cfail
597 check-stage$(1)-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-bench
598 check-stage$(1)-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty
599 check-stage$(1)-pretty-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rpass
600 check-stage$(1)-pretty-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rfail
601 check-stage$(1)-pretty-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-bench
602 check-stage$(1)-pretty-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-pretty
603 check-stage$(1)-rustdoc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustdoc
604 check-stage$(1)-doc-tutorial: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial
608 $(foreach stage,$(STAGES), \
609 $(eval $(call DEF_CHECK_FOR_STAGE,$(stage))))
611 check-fast: check-fast-H-$(CFG_HOST_TRIPLE)