Skip to content

Commit b7ab2ae

Browse files
committed
Fix the dependency for the pretty-rpass-full tests
The current code attempts to define the PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work, because $(1) and $(3) are not inside a function. Moreover, there is a test (run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not an indirect dependency of librustc or libsyntax. Listing all the dependencies will be hard to maintain, but there's a better way to do this... As with the rpass-full and cfail-full tests, add dependencies using the $$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of host and target crates, built for a particular stage and host. We use T_$(3), not T_$(2), because we only build LLVM for host triples (not target triples), so we can only build rustc_llvm for host triples. The fulldeps tests that use plugins need host rustc crates, whereas fulldeps tests that link against rustc and run should be skipped for cross-compilation (such as Android). Fixes #22021
1 parent 7fbedc5 commit b7ab2ae

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

mk/tests.mk

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -753,20 +753,22 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
753753
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
754754
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
755755
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
756-
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
757-
# external crates.
758-
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
759-
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
760-
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
761-
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
762-
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
763756
PRETTY_DIRNAME_pretty-rpass = run-pass
764757
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
765758
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
766759
PRETTY_DIRNAME_pretty-rfail = run-fail
767760
PRETTY_DIRNAME_pretty-bench = bench
768761
PRETTY_DIRNAME_pretty-pretty = pretty
769762

763+
define DEF_PRETTY_FULLDEPS
764+
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
765+
endef
766+
767+
$(foreach host,$(CFG_HOST), \
768+
$(foreach target,$(CFG_TARGET), \
769+
$(foreach stage,$(STAGES), \
770+
$(eval $(call DEF_PRETTY_FULLDEPS,$(stage),$(target),$(host))))))
771+
770772
define DEF_RUN_PRETTY_TEST
771773

772774
PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
@@ -780,7 +782,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
780782
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
781783
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
782784
$$(PRETTY_DEPS_$(4)) \
783-
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
785+
$$(PRETTY_DEPS$(1)_T_$(2)_H_$(3)_$(4))
784786
@$$(call E, run pretty-rpass [$(2)]: $$<)
785787
$$(Q)touch $$@.start_time
786788
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \

0 commit comments

Comments
 (0)