File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -346,16 +346,15 @@ impl Build {
346
346
configure. env_remove ( "CROSS_COMPILE" ) ;
347
347
348
348
// 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`
350
350
// as well.
351
351
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 ] ;
354
353
if env:: var_os ( "RANLIB" ) . is_none ( ) {
355
- configure. env ( "RANLIB" , format ! ( "{}{} -ranlib" , path, suffix ) ) ;
354
+ configure. env ( "RANLIB" , format ! ( "{}-ranlib" , path) ) ;
356
355
}
357
356
if env:: var_os ( "AR" ) . is_none ( ) {
358
- configure. env ( "AR" , format ! ( "{}{} -ar" , path, suffix ) ) ;
357
+ configure. env ( "AR" , format ! ( "{}-ar" , path) ) ;
359
358
}
360
359
}
361
360
You can’t perform that action at this time.
0 commit comments