Skip to content

Commit c0190a9

Browse files
committed
Prevent unoptimized rustpkg tests from running out of stack.
The actual fix would be to make rustpkg use `rustc::monitor` so it picks up anything special that rustc needs, but for now let's keep the tests from breaking.
1 parent 49f851c commit c0190a9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mk/tests.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,17 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
455455
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
456456
))))))
457457

458+
# FIXME (#10104): Raise the stack size to work around rustpkg bypassing
459+
# the code in rustc that would take care of it.
460+
define DEF_RUSTPKG_STACK_FIX
461+
$$(call TEST_OK_FILE,$(1),$(2),$(3),rustpkg): export RUST_MIN_STACK=8000000
462+
endef
463+
464+
$(foreach host,$(CFG_HOST_TRIPLES), \
465+
$(foreach target,$(CFG_TARGET_TRIPLES), \
466+
$(foreach stage,$(STAGES), \
467+
$(eval $(call DEF_RUSTPKG_STACK_FIX,$(stage),$(target),$(host))))))
468+
458469

459470
######################################################################
460471
# Rules for the compiletest tests (rpass, rfail, etc.)

0 commit comments

Comments
 (0)