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 @@ -348,7 +348,7 @@ impl Build {
348
348
349
349
let ar = cc. get_archiver ( ) ;
350
350
configure. env ( "AR" , ar. get_program ( ) ) ;
351
- if ar. get_args ( ) . count ( ) = = 0 {
351
+ if ar. get_args ( ) . count ( ) ! = 0 {
352
352
// On some platforms (like emscripten on windows), the ar to use may not be a
353
353
// single binary, but instead a multi-argument command like `cmd /c emar.bar`.
354
354
// We can't convey that through `AR` alone, and so also need to set ARFLAGS.
@@ -358,14 +358,10 @@ impl Build {
358
358
) ;
359
359
}
360
360
let ranlib = cc. get_ranlib ( ) ;
361
- configure. env ( "RANLIB" , ranlib. get_program ( ) ) ;
362
- if ranlib. get_args ( ) . count ( ) == 0 {
363
- // Same thing as for AR -- we may need to set RANLIBFLAGS
364
- configure. env (
365
- "RANLIBFLAGS" ,
366
- ranlib. get_args ( ) . collect :: < Vec < _ > > ( ) . join ( OsStr :: new ( " " ) ) ,
367
- ) ;
368
- }
361
+ // OpenSSL does not support RANLIBFLAGS. Jam the flags in RANLIB.
362
+ let mut args = vec ! [ ranlib. get_program( ) ] ;
363
+ args. extend ( ranlib. get_args ( ) ) ;
364
+ configure. env ( "RANLIB" , args. join ( OsStr :: new ( " " ) ) ) ;
369
365
370
366
// Make sure we pass extra flags like `-ffunction-sections` and
371
367
// other things like ARM codegen flags.
You can’t perform that action at this time.
0 commit comments