Skip to content

Commit cbbb491

Browse files
committed
Revert "Correctly infer ranlib/ar from cross-gcc (#163)"
This reverts commit 31ef083.
1 parent 31ef083 commit cbbb491

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)