Skip to content

Commit 73aa753

Browse files
committed
Apply patch from alexcrichton#196
1 parent 0b4b936 commit 73aa753

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/lib.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,16 @@ impl Build {
336336
ar.get_args().collect::<Vec<_>>().join(OsStr::new(" ")),
337337
);
338338
}
339-
let ranlib = cc.get_ranlib();
340-
// OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
341-
let mut args = vec![ranlib.get_program()];
342-
args.extend(ranlib.get_args());
343-
configure.env("RANLIB", args.join(OsStr::new(" ")));
339+
340+
// We don't have GCC in newer NDK versions.
341+
if !target.contains("android") || (target.contains("android") && path.contains("-gcc"))
342+
{
343+
let ranlib = cc.get_ranlib();
344+
// OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
345+
let mut args = vec![ranlib.get_program()];
346+
args.extend(ranlib.get_args());
347+
configure.env("RANLIB", args.join(OsStr::new(" ")));
348+
}
344349

345350
// Make sure we pass extra flags like `-ffunction-sections` and
346351
// other things like ARM codegen flags.

0 commit comments

Comments
 (0)