Compiletest no longer respects -Cpanic=abort
in TARGET_RUSTCFLAGS
after #108905
#110850
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Prior to #108905, compiletest would take
TARGET_RUSTCFLAGS
into account when determining whether a test target can unwind. It did so by callingrustc --print=cfg --target=$TARGET $TARGET_RUSTCFLAGS
, which changes the reported panic strategy depending on the flags:After the PR, compiletest calls
rustc --print=all-target-specs-json -Zunstable-options
which always reports the default panic strategy for the target (even ifTARGET_RUSTCFLAGS
are passed):This causes a problem for us because we run the compiler test suite against a toolchain built with
-Cpanic=abort
. Compiletest will run tests marked with// needs-unwind
even though they panic (and thus fail).I see a few options for fixing this issue:
--print=all-target-specs-json
respect any additional flags passed.target_rustcflags
specifically for-Cpanic=abort
and modify the return value ofConfig::can_unwind()
to take it into account.cc @pietroalbini who authored the original PR
The text was updated successfully, but these errors were encountered: