olivierlemasle opened PR #2957 from tests-no-x86_64 to main:
These 5 tests fail with the error "This test requires x86_64 support." when
executed on another architecture.
olivierlemasle edited PR #2957 from tests-no-x86_64 to main:
Restrict running tests dependant of x86_64
These 5 tests fail with the error "This test requires x86_64 support." when executed on another architecture.
bnjbvr submitted PR review.
bnjbvr submitted PR review.
bnjbvr created PR review comment:
As bjorn3 pointed out, you might need something like
#[cfg_attr(feature = "x86", ignore)]here and below instead.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
I think you are missing a
not().
olivierlemasle edited PR #2957 from tests-no-x86_64 to main.
olivierlemasle submitted PR review.
olivierlemasle created PR review comment:
Thank you! However,
x86is a feature ofcranelift-codegen, notcranelift-frontend. Is there a way to check from the _frontend_ crate if the x86 backend is available?
(sorry if it's a newbie question!)
bnjbvr edited PR review comment.
bnjbvr created PR review comment:
Ah, it's a very good question. This particular crate shouldn't have tests taht depend on specific features of other crates, otherwise they wouldn't be run by our automation.
The behavior of
cranelift-codegen, in the absence of specifying a target architecture for which one would like to compile, is to target the host architecture (this happens incranelift-codegen'sbuild.rsscript). But that doesn't _enable_ the Cargo feature either, so we couldn't even guard against thecranelift-codegen'sx86feature here.So I think that checking against the
target_archis actually the right way to go: on a x86_64 host, the x86_64 target will be enabled by default. Sorry for the back and forth here, you were probably right in the first place :)
Would still be nice to use thecfg_attrdirective instead.
bnjbvr submitted PR review.
olivierlemasle updated PR #2957 from tests-no-x86_64 to main.
olivierlemasle created PR review comment:
Thanks, I've updated the PR accordingly.
olivierlemasle submitted PR review.
bjorn3 submitted PR review.
abrown submitted PR review.
abrown merged PR #2957.
Last updated: Dec 06 2025 at 06:05 UTC