Skip to content
Closed
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
15 changes: 10 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,16 @@ impl Build {
ar.get_args().collect::<Vec<_>>().join(OsStr::new(" ")),
);
}
let ranlib = cc.get_ranlib();
// OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
let mut args = vec![ranlib.get_program()];
args.extend(ranlib.get_args());
configure.env("RANLIB", args.join(OsStr::new(" ")));

// We don't have GCC in newer NDK versions.
if !target.contains("android") || (target.contains("android") && path.contains("-gcc"))
{
let ranlib = cc.get_ranlib();
// OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
let mut args = vec![ranlib.get_program()];
args.extend(ranlib.get_args());
configure.env("RANLIB", args.join(OsStr::new(" ")));
}

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