Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Linux atomic emulation on androideabi #423

Merged
merged 1 commit into from May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ fn main() {
println!("cargo:rustc-cfg=thumb_1")
}

// Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures.
if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" {
// Only emit the ARM Linux atomic emulation on pre-ARMv6 architectures. This
// includes the old androideabi. It is deprecated but it is available as a
// rustc target (arm-linux-androideabi).
if llvm_target[0] == "armv4t" || llvm_target[0] == "armv5te" || llvm_target[2] == "androideabi"
{
println!("cargo:rustc-cfg=kernel_user_helpers")
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ pub mod mem;
#[cfg(target_arch = "arm")]
pub mod arm;

#[cfg(all(kernel_user_helpers, target_os = "linux", target_arch = "arm"))]
#[cfg(all(
kernel_user_helpers,
any(target_os = "linux", target_os = "android"),
target_arch = "arm"
))]
pub mod arm_linux;

#[cfg(any(target_arch = "riscv32"))]
Expand Down