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 {
326326
327327 let ar = cc. get_archiver ( ) ;
328328 configure. env ( "AR" , ar. get_program ( ) ) ;
329- if ar. get_args ( ) . count ( ) = = 0 {
329+ if ar. get_args ( ) . count ( ) ! = 0 {
330330 // On some platforms (like emscripten on windows), the ar to use may not be a
331331 // single binary, but instead a multi-argument command like `cmd /c emar.bar`.
332332 // We can't convey that through `AR` alone, and so also need to set ARFLAGS.
@@ -336,14 +336,10 @@ impl Build {
336336 ) ;
337337 }
338338 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 ( " " ) ) ) ;
347343
348344 // Make sure we pass extra flags like `-ffunction-sections` and
349345 // other things like ARM codegen flags.
You can’t perform that action at this time.
0 commit comments