-
Couldn't load subscription status.
- Fork 13.9k
Closed
Closed
Copy link
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.O-SystemZTarget: SystemZ processors (s390x)Target: SystemZ processors (s390x)
Description
#127506 introduced what I think is a logic error: cfg!(target_feature = "backchain") is now always true on s390x targets, even if the feature gate is not set. I verified this with Miri, which shares the cfg logic with rustc so it should be a correct test.
This should print false when built without -Ctarget-feature=+backchain (as the feature seems off-by-default), but prints true instead:
fn main() {
dbg!(cfg!(target_feature = "backchain"));
}Cc @liushuyu
Metadata
Metadata
Assignees
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.O-SystemZTarget: SystemZ processors (s390x)Target: SystemZ processors (s390x)