Skip to content

Commit 7387c4d

Browse files
committed
Auto merge of #128416 - maurer:remove-android-hack, r=<try>
android: Remove libstd hacks for unsupported Android APIs Our minimum supported API version is 21, remove hacks to support older Android APIs. try-job: arm-android r? tgross35
2 parents f8060d2 + 6357d41 commit 7387c4d

File tree

3 files changed

+7
-100
lines changed

3 files changed

+7
-100
lines changed

library/std/src/sys/pal/mod.rs

+7-14
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,14 @@ cfg_if::cfg_if! {
7777
}
7878

7979
#[cfg(not(test))]
80-
cfg_if::cfg_if! {
81-
if #[cfg(target_os = "android")] {
82-
pub use self::android::log2f32;
83-
pub use self::android::log2f64;
84-
} else {
85-
#[inline]
86-
pub fn log2f32(n: f32) -> f32 {
87-
unsafe { crate::intrinsics::log2f32(n) }
88-
}
80+
#[inline]
81+
pub fn log2f32(n: f32) -> f32 {
82+
unsafe { crate::intrinsics::log2f32(n) }
83+
}
8984

90-
#[inline]
91-
pub fn log2f64(n: f64) -> f64 {
92-
unsafe { crate::intrinsics::log2f64(n) }
93-
}
94-
}
85+
#[inline]
86+
pub fn log2f64(n: f64) -> f64 {
87+
unsafe { crate::intrinsics::log2f64(n) }
9588
}
9689

9790
#[cfg(not(target_os = "uefi"))]

library/std/src/sys/pal/unix/android.rs

-81
This file was deleted.

library/std/src/sys/pal/unix/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use crate::io::ErrorKind;
88
pub mod weak;
99

1010
pub mod alloc;
11-
pub mod android;
1211
pub mod args;
1312
pub mod env;
1413
pub mod fd;
@@ -237,12 +236,8 @@ pub unsafe fn cleanup() {
237236
}
238237

239238
#[allow(unused_imports)]
240-
#[cfg(not(target_os = "android"))]
241239
pub use libc::signal;
242240

243-
#[cfg(target_os = "android")]
244-
pub use crate::sys::android::signal;
245-
246241
#[inline]
247242
pub(crate) fn is_interrupted(errno: i32) -> bool {
248243
errno == libc::EINTR

0 commit comments

Comments
 (0)