Skip to content

Commit 2956079

Browse files
authored
Merge pull request #423 from ATiltedTree/android-sync
Include Linux atomic emulation on androideabi
2 parents 612ddf8 + 186517b commit 2956079

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

build.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ fn main() {
6969
println!("cargo:rustc-cfg=thumb_1")
7070
}
7171

72-
// Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures.
73-
if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" {
72+
// Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures. This
73+
// includes the old androideabi. It is deprecated but it is available as a
74+
// rustc target (arm-linux-androideabi).
75+
if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" || llvm_target[2] == "androideabi"
76+
{
7477
println!("cargo:rustc-cfg=kernel_user_helpers")
7578
}
7679
}

src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ pub mod mem;
4949
#[cfg(target_arch = "arm")]
5050
pub mod arm;
5151

52-
#[cfg(all(kernel_user_helpers, target_os = "linux", target_arch = "arm"))]
52+
#[cfg(all(
53+
kernel_user_helpers,
54+
any(target_os = "linux", target_os = "android"),
55+
target_arch = "arm"
56+
))]
5357
pub mod arm_linux;
5458

5559
#[cfg(any(target_arch = "riscv32"))]

0 commit comments

Comments
 (0)