diff options
| author | Hans Kratz <hans@appfour.com> | 2021-09-20 18:19:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-20 17:19:05 +0100 |
| commit | 26cce19427e2a9c4b76e280f52cac380d6fcc84d (patch) | |
| tree | cb9665846a910cd1dd7dcb885f8ee56e5712a5c6 /library/stdarch/crates/std_detect | |
| parent | 504b0cf68b33e1fd11fbc3287c34fe777c9ffd35 (diff) | |
| download | rust-26cce19427e2a9c4b76e280f52cac380d6fcc84d.tar.gz rust-26cce19427e2a9c4b76e280f52cac380d6fcc84d.zip | |
Make dedup guard optional (#1215)
Diffstat (limited to 'library/stdarch/crates/std_detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs b/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs index 077fc9e4c89..76908db3140 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/linux/auxvec.rs @@ -1,5 +1,5 @@ //! Parses ELF auxiliary vectors. -#![cfg_attr(not(target_arch = "aarch64"), allow(dead_code))] +#![allow(dead_code)] pub(crate) const AT_NULL: usize = 0; @@ -89,11 +89,10 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> { #[cfg(not(feature = "std_detect_dlsym_getauxval"))] { - let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize }; - // Targets with only AT_HWCAP: #[cfg(any(target_arch = "aarch64", target_arch = "mips", target_arch = "mips64"))] { + let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize }; if hwcap != 0 { return Ok(AuxVec { hwcap }); } @@ -106,6 +105,7 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> { target_arch = "powerpc64" ))] { + let hwcap = unsafe { libc::getauxval(AT_HWCAP as libc::c_ulong) as usize }; let hwcap2 = unsafe { libc::getauxval(AT_HWCAP2 as libc::c_ulong) as usize }; if hwcap != 0 && hwcap2 != 0 { return Ok(AuxVec { hwcap, hwcap2 }); |
