-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
target_arch
is wrong in arm64ec-pc-windows-msvc
#131172
Comments
@madsmtm See the platform support documentation: https://github.com/rust-lang/rust/blob/44722bd9ba50426191f78d12138a2ae1a12affe7/src/doc/rustc/src/platform-support/arm64ec-pc-windows-msvc.md#reusing-code-from-other-architectures---x86_64-or-aarch64 Does it answer your questions? |
There was also a good thread discussing this here: rust-lang/stdarch#1550 (comment) As for |
tbh, I still would have preferred we had went with this as a |
Ah, I was sorta just batch-opening issues, didn't research that closely enough.
Thanks for the link!
Hmm, I seemed to remember discussion somewhere that |
relevantly, |
Personally, I don't really have a stake in this, I'll leave the issue open though for T-compiler (or is @rustbot label T-compiler |
Rust's
target_arch
cfg is generally very generic, and does not include e.g. the sub-architecture.For example, the
arm64e-apple-darwin
hastarget_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-msvc
is 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_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 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
The text was updated successfully, but these errors were encountered: