Commit acfd2cf
authored
Rollup merge of #146323 - h3fang:issue-146230-fix, r=Amanieu
check before test for hardware capabilites in bits 32~63 of usize
This commit tries to fix rust-lang/rust#146230.
`std::arch::is_aarch64_feature_detected` panics on aarch64 ILP32 targets.
After some digging, the real problem is
https://github.com/rust-lang/rust/blob/91edc3ebccc4daa46c20a93f4709862376da1fdd/library/std_detect/src/detect/os/linux/aarch64.rs#L210-L241
checks bits 32~63 of usize unconditionally on normal aarch64 LP64 target and aarch64 ILP32 target.
Here I propose to move these to a block guarded by `#[cfg(target_pointer_width="64")]`.
See rust-lang/rust#146230 for more detailed analysis.
r? ```@Amanieu```File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments