Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions cargo/private/cargo_build_script_runner/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,7 @@ fn run_buildrs() -> Result<(), String> {
}

if let Some(ar_path) = env::var_os("AR") {
// The default OSX toolchain uses libtool as ar_executable not ar.
// This doesn't work when used as $AR, so simply don't set it - tools will probably fall back to
// /usr/bin/ar which is probably good enough.
let file_name = Path::new(&ar_path)
.file_name()
.ok_or_else(|| "Failed while getting file name".to_string())?
.to_string_lossy();
if file_name.contains("libtool") {
command.env_remove("AR");
command.env_remove("ARFLAGS");
} else {
command.env("AR", exec_root.join(ar_path));
}
command.env("AR", exec_root.join(ar_path));
}

// replace env vars with a ${pwd} prefix with the exec_root
Expand Down
Loading