Skip to content

Commit

Permalink
Apply patch from alexcrichton#196
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeyax committed Aug 7, 2023
1 parent 0b4b936 commit 73aa753
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,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

0 comments on commit 73aa753

Please sign in to comment.