Skip to content

target_arch is wrong in arm64ec-pc-windows-msvc #131172

Open

Description

Rust's target_arch cfg is generally very generic, and does not include e.g. the sub-architecture.

For example, the arm64e-apple-darwin has target_arch = "aarch64". This is also true of all the ARM targets, these all have target_arch = "arm" even though the full target name is much longer.

arm64ec-pc-windows-msvc is the only target that differs here, and sets target_arch = "arm64ec". I am not familiar with the specifics of ARM64EC, but I think it should probably set target_arch = "aarch64" too? Or, if it really needs to be different, target_arch = "aarch64ec", since Rust prefers Aarch64 over ARM64? Or maybe target_arch = "aarch64", but with an extra target_feature to allow distinguishing them?

I would've filed a PR to fix it myself, but it's a bit of work since a lot of places in rustc check for target.arch == "arm64ec", so I wanted to make sure I was on the right path first.

CC target maintainer @dpaoliello.
@rustbot label O-windows O-AArch64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeO-windowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions