Skip to content

s390x-unknown-linux-gnu: cfg!(target_feature = "backchain") is always true #129927

Closed
@RalfJung

Description

@RalfJung

#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

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.O-SystemZTarget: SystemZ processors (s390x)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions