Skip to content

Commit

Permalink
Use llvm-ar, llvm-ranlib for Android NDK (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku authored Mar 2, 2024
1 parent 2f587f5 commit e9379a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3106,7 +3106,11 @@ impl Build {
Some(t) => t,
None => {
if target.contains("android") {
name = format!("{}-{}", target.replace("armv7", "arm"), tool);
name = format!("llvm-{}", tool);
match Command::new(&name).arg("--version").status() {
Ok(status) if status.success() => (),
_ => name = format!("{}-{}", target.replace("armv7", "arm"), tool),
}
self.cmd(&name)
} else if target.contains("msvc") {
// NOTE: There isn't really a ranlib on msvc, so arguably we should return
Expand Down

0 comments on commit e9379a4

Please sign in to comment.