File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ impl Build {
326
326
327
327
let ar = cc. get_archiver ( ) ;
328
328
configure. env ( "AR" , ar. get_program ( ) ) ;
329
- if ar. get_args ( ) . count ( ) = = 0 {
329
+ if ar. get_args ( ) . count ( ) ! = 0 {
330
330
// On some platforms (like emscripten on windows), the ar to use may not be a
331
331
// single binary, but instead a multi-argument command like `cmd /c emar.bar`.
332
332
// We can't convey that through `AR` alone, and so also need to set ARFLAGS.
@@ -336,14 +336,10 @@ impl Build {
336
336
) ;
337
337
}
338
338
let ranlib = cc. get_ranlib ( ) ;
339
- configure. env ( "RANLIB" , ranlib. get_program ( ) ) ;
340
- if ranlib. get_args ( ) . count ( ) == 0 {
341
- // Same thing as for AR -- we may need to set RANLIBFLAGS
342
- configure. env (
343
- "RANLIBFLAGS" ,
344
- ranlib. get_args ( ) . collect :: < Vec < _ > > ( ) . join ( OsStr :: new ( " " ) ) ,
345
- ) ;
346
- }
339
+ // OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
340
+ let mut args = vec ! [ ranlib. get_program( ) ] ;
341
+ args. extend ( ranlib. get_args ( ) ) ;
342
+ configure. env ( "RANLIB" , args. join ( OsStr :: new ( " " ) ) ) ;
347
343
348
344
// Make sure we pass extra flags like `-ffunction-sections` and
349
345
// other things like ARM codegen flags.
You can’t perform that action at this time.
0 commit comments