Skip to content

Commit c5a62b8

Browse files
authored
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`.
2 parents a4774bf + 4fec3aa commit c5a62b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_llvm/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ fn main() {
254254
println!("cargo:rustc-link-lib=kstat");
255255
}
256256

257-
if (target.starts_with("arm") && !target.contains("freebsd") && !target.contains("ohos"))
257+
if (target.starts_with("arm")
258+
&& !target.starts_with("arm64")
259+
&& !target.contains("freebsd")
260+
&& !target.contains("ohos"))
258261
|| target.starts_with("mips-")
259262
|| target.starts_with("mipsel-")
260263
|| target.starts_with("powerpc-")

0 commit comments

Comments
 (0)