diff options
| author | Taiki Endo <te316e89@gmail.com> | 2023-04-24 22:13:58 +0900 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-04-24 12:50:27 -0700 |
| commit | 38c1a1619086ba079d24d2e48a31a81452ae18cf (patch) | |
| tree | 9a091e76e65f38126abb2d65a71a3b7363b4f437 /library/stdarch/crates/std_detect | |
| parent | e50d4d54b5cb934d2661f4f3e3d941e9bc0d5192 (diff) | |
| download | rust-38c1a1619086ba079d24d2e48a31a81452ae18cf.tar.gz rust-38c1a1619086ba079d24d2e48a31a81452ae18cf.zip | |
std_detect: Do not use libc::getauxval on 32-bit Android
libc crate currently doesn't provide it.
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, 4 insertions, 2 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 1c0a6fcf07d..8bc0b30c3c6 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 @@ -71,7 +71,8 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> { #[cfg(all( feature = "std_detect_dlsym_getauxval", not(all(target_os = "linux", target_env = "gnu")), - not(target_os = "android"), + // TODO: libc crate currently doesn't provide getauxval on 32-bit Android. + not(all(target_os = "android", target_pointer_width = "64")), ))] { // Try to call a dynamically-linked getauxval function. @@ -118,7 +119,8 @@ pub(crate) fn auxv() -> Result<AuxVec, ()> { #[cfg(any( not(feature = "std_detect_dlsym_getauxval"), all(target_os = "linux", target_env = "gnu"), - target_os = "android", + // TODO: libc crate currently doesn't provide getauxval on 32-bit Android. + all(target_os = "android", target_pointer_width = "64"), ))] { // Targets with only AT_HWCAP: |
