Rollup merge of #146184 - dpaoliello:llvmbuildarm64, r=cuviper

In the rustc_llvm build script, don't consider arm64* to be 32-bit

The build script for `rustc_llvm` needs to detect 32-bit targets so that it links against `libatomics`. To do this, it matches the target architecture against `arm`, unfortunately incorrectly matches Arm64EC, Arm64E, etc.

This change adds a check that the target arch doesn't match `arm64`.
This commit is contained in:
Stuart Cook 2025-09-09 14:35:03 +10:00 committed by GitHub
commit c5a62b8058
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -254,7 +254,10 @@ fn main() {
println!("cargo:rustc-link-lib=kstat");
}
if (target.starts_with("arm") && !target.contains("freebsd") && !target.contains("ohos"))
if (target.starts_with("arm")
&& !target.starts_with("arm64")
&& !target.contains("freebsd")
&& !target.contains("ohos"))
|| target.starts_with("mips-")
|| target.starts_with("mipsel-")
|| target.starts_with("powerpc-")