Skip to content

Commit e9379a4

Browse files
authored
Use llvm-ar, llvm-ranlib for Android NDK (#983)
1 parent 2f587f5 commit e9379a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,11 @@ impl Build {
31063106
Some(t) => t,
31073107
None => {
31083108
if target.contains("android") {
3109-
name = format!("{}-{}", target.replace("armv7", "arm"), tool);
3109+
name = format!("llvm-{}", tool);
3110+
match Command::new(&name).arg("--version").status() {
3111+
Ok(status) if status.success() => (),
3112+
_ => name = format!("{}-{}", target.replace("armv7", "arm"), tool),
3113+
}
31103114
self.cmd(&name)
31113115
} else if target.contains("msvc") {
31123116
// NOTE: There isn't really a ranlib on msvc, so arguably we should return

0 commit comments

Comments
 (0)