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
Rust's
target_archcfg is generally very generic, and does not include e.g. the sub-architecture.For example, the
arm64e-apple-darwinhastarget_arch = "aarch64". This is also true of all the ARM targets, these all havetarget_arch = "arm"even though the full target name is much longer.arm64ec-pc-windows-msvcis the only target that differs here, and setstarget_arch = "arm64ec". I am not familiar with the specifics of ARM64EC, but I think it should probably settarget_arch = "aarch64"too? Or, if it really needs to be different,target_arch = "aarch64ec", since Rust prefers Aarch64 over ARM64? Or maybetarget_arch = "aarch64", but with an extratarget_featureto 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
rustccheck fortarget.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