File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -346,16 +346,15 @@ impl Build {
346346 configure. env_remove ( "CROSS_COMPILE" ) ;
347347
348348 // Infer ar/ranlib tools from cross compilers if the it looks like
349- // we're doing something like `foo-gcc` route that to `foo-gcc- ranlib`
349+ // we're doing something like `foo-gcc` route that to `foo-ranlib`
350350 // as well.
351351 if path. ends_with ( "-gcc" ) && !target. contains ( "unknown-linux-musl" ) {
352- let suffix = & path[ path. len ( ) - 4 ..] ;
353- let path = & path[ ..path. len ( ) - suffix. len ( ) ] ;
352+ let path = & path[ ..path. len ( ) - 4 ] ;
354353 if env:: var_os ( "RANLIB" ) . is_none ( ) {
355- configure. env ( "RANLIB" , format ! ( "{}{} -ranlib" , path, suffix ) ) ;
354+ configure. env ( "RANLIB" , format ! ( "{}-ranlib" , path) ) ;
356355 }
357356 if env:: var_os ( "AR" ) . is_none ( ) {
358- configure. env ( "AR" , format ! ( "{}{} -ar" , path, suffix ) ) ;
357+ configure. env ( "AR" , format ! ( "{}-ar" , path) ) ;
359358 }
360359 }
361360
You can’t perform that action at this time.
0 commit comments